How do I create a new Node using pulldom?
saqib.ali.75 at gmail.com
Fri Jun 20 22:17:54 CEST 2008
I'm using xml.dom.pulldom to parse through an XML file. I use
expandNode() to scrutinize certain blocks of it that I'm interested
Once I find a block of XML in the input file that I'm interested in, I
need to add my own block <MyTag>.....</MyTag> to the pulldom tree I'm
building in memory.
The documentation on PullDom is worse than atrocious. It is simply non-
existant. I can't even find a simple explanation of what the functions
are named and what arguments they take. Sheesh.
When I have a node N of the tree, I think that I can use
N.appendChild() to do what I want (just guessing from the function
name which I can see).
appendChild takes 1 argument -- a new node.
But I don't know how to create such a node.
Can someone out there please post a code fragment showing how to
create a pulldom node? The simpler and more commented it is the
More information about the Python-list