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

xmlAddAttribute(LibxmlNode,String,String) -- add an attribute to an XML node

Synopsis

Description

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

o1 = <bar>asdf</bar>

o1 : LibxmlNode (xmlTypeDescription)
i2 : a = xmlAddAttribute(n,"foo","the value")

o2 = foo = "the value"

o2 : LibxmlAttribute
i3 : xmlGetName a

o3 = foo
i4 : n

o4 = <bar foo="the value">asdf</bar>

o4 : LibxmlNode (xmlTypeDescription)

Ways to use this method: