tags:

views:

92

answers:

1

Is it possible to get the name of a node using minidom?

for example i have a node:

<heading><![CDATA[5 year]]></heading>

what i'm trying to do is store the value heading so that i can use it as a key in a dictionary,

the closest i can get is something like

[<DOM Element: heading at 0x11e6d28>]

i'm sure i'm overlooking something very simple here, thanks!

+2  A: 

Is this what you mean?

tag= node.tagName
d[tag]= node

tagName is defined in DOM Level 1 Core, the basic standard that minidom (mostly) implements.

bobince
that's exactly what i am after, thank you!
Alex