[XML-SIG] Basic Question
cuba at iotacenter.org
Tue Feb 3 17:25:58 EST 2004
I'm new to PyXML and having trouble finding the answer
to a most basic question.
With this slight modification of the sample code in section 6.5
of the Python/XML How To, Walking the Over the Entire Tree:
>walker = xml_dom_object.createTreeWalker(xml_dom_object.documentElement,
> NodeFilter.SHOW_ALL, None, 0)
> print walker.currentNode.nodeName, walker.currentNode.nodeValue
> next = walker.nextNode()
> if next is None: break
I was able to get this output (every node name followed by its value):
#text Santa Monica
The output I want is just the element name
and the *element* value (not node value):
City Santa Monica
The relevant methods and/or attributes and
how to use them are not well documented,
(not for a beginner, at least).
Can someone explain this to me?
More information about the XML-SIG