Jump to content

XML/XPath: Difference between revisions

No edit summary
Line 217:
 
xmlfile = file("test3.xml") # load xml document from file
xmldoc = xmldom.parse(xmlfile).documentElement # parse from file stream or...
xmldoc = xmldom.parseString("<inventory title="OmniCorp Store #45x10^3">...</inventory>").documentElement # or alternatively, parse a string
# 1st Task: Retrieve the first "item" element
Cookies help us deliver our services. By using our services, you agree to our use of cookies.