Macaulay2 » Documentation
Packages » XML :: xmlAddElement(LibxmlNode,String)
next | previous | forward | backward | up | index | toc

xmlAddElement(LibxmlNode,String) -- add an element to an XML node

Synopsis

Description

i1 : n = xmlParse ///<bar></bar>///

o1 = <bar/>

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

o2 = <a/>

o2 : LibxmlNode (xmlTypeDescription)
i3 : xmlAddElement(n,"b")

o3 = <b/>

o3 : LibxmlNode (xmlTypeDescription)
i4 : xmlAddElement(oo,"b1")

o4 = <b1/>

o4 : LibxmlNode (xmlTypeDescription)
i5 : n

o5 = <bar>
           <a/>
           <b>
             <b1/>
           </b>
         </bar>

o5 : LibxmlNode (xmlTypeDescription)

Ways to use this method: