Examples for 'XML::print.XMLAttributeDef'


Methods for displaying XML objects

Aliases: print.XMLAttributeDef print.XMLCDataNode print.XMLElementContent print.XMLElementDef print.XMLEntity print.XMLEntityRef print.XMLNode print.XMLTextNode print.XMLComment print.XMLOrContent print.XMLSequenceContent print.XMLProcessingInstruction

Keywords: IO file

### ** Examples

  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 = "")
<event date="2003-05-23" id="esc018">
  <dialog>
    <feature name="Date">2003-05-23</feature>
    <feature name="f2">1</feature>
    <feature name="f3">3</feature>
  </dialog>
  <dialog>
    <feature name="Date">2003-05-24</feature>
    <feature name="f2">17</feature>
    <feature name="f3">24</feature>
  </dialog>
  <dialog>
    <feature name="Date">http://mtadss01.mt.att.com/nlslogapp/displaysession.jsp?serviceid=esc018&amp;sessionid=2OLhD6ZX&amp;dat+e=2003_05_23</feature>
    <feature name="f2">17</feature>
    <feature name="f3">24</feature>
  </dialog>
</event>
     # And now the default mechanism
  doc = xmlRoot(xmlTreeParse(fileName))
  print(doc)
<event date="2003-05-23" id="esc018">
 <dialog>
  <feature name="Date">2003-05-23</feature>
  <feature name="f2">1</feature>
  <feature name="f3">3</feature>
 </dialog>
 <dialog>
  <feature name="Date">2003-05-24</feature>
  <feature name="f2">17</feature>
  <feature name="f3">24</feature>
 </dialog>
 <dialog>
  <feature name="Date">http://mtadss01.mt.att.com/nlslogapp/displaysession.jsp?serviceid=esc018&amp;sessionid=2OLhD6ZX&amp;dat+e=2003_05_23</feature>
  <feature name="f2">17</feature>
  <feature name="f3">24</feature>
 </dialog>
</event>

[Package XML version 3.99-0.10 Index]