XML/XPath: Difference between revisions

({{omit from|PARI/GP}})
Line 668:
 
xmlfile = file("test3.xml") # load xml document from file
xmldoc = xmldomminidom.parse(xmlfile).documentElement # parse from file stream or...
xmldoc = xmldomminidom.parseString("<inventory title="OmniCorp Store #45x10^3">...</inventory>").documentElement # alternatively, parse a string
# 1st Task: Retrieve the first "item" element
Anonymous user