[rkward-cvs] SF.net SVN: rkward:[4185] trunk/rkward/packages/XiMpLe/R/XMLNode.R

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Sat Mar 17 17:03:53 UTC 2012


Revision: 4185
          http://rkward.svn.sourceforge.net/rkward/?rev=4185&view=rev
Author:   m-eik
Date:     2012-03-17 17:03:53 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
XiMpLe: treat numeric values as text value in tags

Modified Paths:
--------------
    trunk/rkward/packages/XiMpLe/R/XMLNode.R

Modified: trunk/rkward/packages/XiMpLe/R/XMLNode.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/XMLNode.R	2012-03-17 00:58:13 UTC (rev 4184)
+++ trunk/rkward/packages/XiMpLe/R/XMLNode.R	2012-03-17 17:03:53 UTC (rev 4185)
@@ -18,7 +18,9 @@
 XMLNode <- function(name, ..., attrs=NULL, namespace="", namespaceDefinitions=NULL, .children=list(...)){
 
 	# text node?
-	if(identical(name, "") & all(unlist(lapply(.children, is.character)))){
+	if(identical(name, "") &
+			(all(unlist(lapply(.children, is.character)))) |
+			all(unlist(lapply(.children, is.numeric)))){
 		all.children <- list()
 		value <- paste(..., sep=" ")
 	} else if(identical(.children, list(""))){

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list