Learn R Programming

XML (version 3.1-1)

print.XMLAttributeDef: 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 print function. Each typically outputs its contents in the way that they would appear in an XML document.

Usage

## S3 method for class 'XMLNode':
print(x, ..., indent= "", tagSeparator = "\n")
## S3 method for class 'XMLComment':
print(x, ..., indent = "", tagSeparator = "\n")
## S3 method for class 'XMLTextNode':
print(x, ..., indent = "", tagSeparator = "\n")
## S3 method for class 'XMLCDataNode':
print(x, ..., indent="", tagSeparator = "\n")
## S3 method for class 'XMLProcessingInstruction':
print(x, ..., indent="", tagSeparator = "\n")
## S3 method for class 'XMLAttributeDef':
print(x, ...)
## S3 method for class 'XMLElementContent':
print(x, ...)
## S3 method for class 'XMLElementDef':
print(x, ...)
## S3 method for class 'XMLEntity':
print(x, ...)
## S3 method for class 'XMLEntityRef':
print(x, ..., indent= "", tagSeparator = "\n")
## S3 method for class 'XMLOrContent':
print(x, ...)
## S3 method for class 'XMLSequenceContent':
print(x, ...)

Arguments

Value

  • Currently, NULL.

References

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

See Also

xmlTreeParse

Examples

Run this code
fileName <- system.file("exampleData", "event.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)

Run the code above in your browser using DataLab