Macaulay2 » Documentation
Packages » XML :: xmlDocDump
next | previous | forward | backward | up | index | toc

xmlDocDump -- dump a document

Description

i1 : n = xmlNewRoot "foo"

o1 = <foo/>

o1 : LibxmlNode (xmlTypeDescription)
i2 : xmlAddElement(n,"bar")

o2 = <bar/>

o2 : LibxmlNode (xmlTypeDescription)
i3 : xmlAddText(oo,"hi there")

o3 = "hi there"

o3 : LibxmlNode (xmlTypeDescription)
i4 : xmlAddElement(n,"key")

o4 = <key/>

o4 : LibxmlNode (xmlTypeDescription)
i5 : xmlAddText(oo,"frobble 你好")

o5 = "frobble 你好"

o5 : LibxmlNode (xmlTypeDescription)
i6 : n

o6 = <foo>
           <bar>hi there</bar>
           <key>frobble 你好</key>
         </foo>

o6 : LibxmlNode (xmlTypeDescription)
i7 : xmlDocDump n

o7 = <?xml version="1.0" encoding="UTF-8"?>
     <foo><bar>hi there</bar><key>frobble 你好</key></foo>

See also

For the programmer

The object xmlDocDump is a compiled function.