Re: minidom Node to Element

2005-06-03 Thread Richard Lewis
Hang on! It *knows*! Wow, you can call getElementsByTagName() on a Node object and it does the right thing. Weird, but I like it! Very Python! R. On Fri, 03 Jun 2005 17:07:37 +0100, "Richard Lewis" <[EMAIL PROTECTED]> said: > Hey, > > Can I convert an xml.dom.Node object to an xml.dom.Element ob

minidom Node to Element

2005-06-03 Thread Richard Lewis
Hey, Can I convert an xml.dom.Node object to an xml.dom.Element object? I want to do the conversion inside a condition like this: if node.nodeType == Node.ELEMENT_NODE: # do conversion: element = Element(node) element = node.toElement() so it definitely won't cause problems. I just c