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