toString.XMLNode

0th

Percentile

Creates string representation of XML node

This creates a string from a hierarchical XML node and its children just as it prints on the console or one might see it in a document.

Keywords
file
Usage
# S3 method for XMLNode
toString(x, ...)
Arguments
x

an object of class XMLNode.

currently ignored

Details

This uses a textConnection object using the name .tempXMLOutput. Since this is global, it will overwrite any existing object of that name! As a result, this function cannot be used recursively in its present form.

Value

A character vector with one element, that being the string corresponding to the XML node's contents.

Note

This requires the Expat XML parser to be installed.

References

http://www.w3.org/XML, http://www.jclark.com/xml

See Also

xmlNode xmlTreeParse

Aliases
  • toString.XMLNode
Examples
# NOT RUN {
 x <- xmlRoot(xmlTreeParse(system.file("exampleData", "gnumeric.xml", package = "XML")))

 toString(x)
# }
Documentation reproduced from package XML, version 3.98-1.19, License: BSD_2_clause + file LICENSE

Community examples

Looks like there are no examples yet.