Methods for displaying XML objects

DESCRIPTION:

These different methods attempt to provide a convenient way to display R objects representing XML elements when they are printed in the usual manner on the console, files, etc. via the function. Each typically outputs its contents in the way that they would appear in an XML document.

USAGE:

print.XMLNode(x, ..., indent= "", tagSeparator = "\n")
print.XMLComment(x, ..., indent = "", tagSeparator = "\n")
print.XMLCommentNode(x, ..., indent = "", tagSeparator = "\n")
print.XMLTextNode(x, ..., indent = "", tagSeparator = "\n")
print.XMLCDataNode(x, ..., indent="", tagSeparator = "\n")
print.XMLProcessingInstruction(x, ..., indent="", tagSeparator = "\n")
print.XMLAttributeDef(x, ...)
print.XMLElementContent(x, ...)
print.XMLElementDef(x, ...)
print.XMLEntity(x, ...)
print.XMLEntityRef(x, ..., indent= "", tagSeparator = "\n")
print.XMLOrContent(x, ...)
print.XMLSequenceContent(x, ...)

ARGUMENTS:

x
the XML object to be displayed
...
additional arguments for controlling the output from print. Currently unused.
indent
a prefix that is emitted before the node to indent it relative to its parent and child nodes. This is appended with a space at each succesive level of the tree. If no indentation is desired, you can also pass the value FALSE for this argument.
tagSeparator
when printing nodes, successive nodes and children are by default displayed on new lines for easier reading. One can specify a string (such as the empty string "") for this argument to control how the elements are separated in the output.

VALUE:

Currently, NULL.

AUTHOR(S):

Duncan Temple Lang

REFERENCES:

http://www.w3.org, http://www.omegahat.org/RSXML

SEE ALSO:

EXAMPLES:

  fileName <- system.file("exampleData", "mtcars.xml", package ="XML")

     # Example of how to get faithful copy of the XML.
  doc < xmlRoot(xmlTreeParse(fileName, trim = FALSE, ignoreBlanks = FALSE))
  print(doc, indent = FALSE, tagSeparator = "")

     # And now the default mechanism
  doc < xmlRoot(xmlTreeParse(fileName))
  print(doc)