Hi all,<br><br>I am using pulldom to handle large xml files.It works fine, but i do not know how to store a particular set of records(as xml) out of the recordset.<br>-----------------code---------<br>from xml.dom import pulldom<br>
hamlet_file = open("input_xml/inp_test.xml")<br>events = pulldom.parse(hamlet_file)<br>for (event, node) in events:<br> if event == pulldom.START_ELEMENT:<br> if node.tagName == "Record":<br> events.expandNode(node)<br>
print node #this does not work as it is a object<br>------------------------------<br> <br>Whenever the node name is a Record,i process it. I want to store the all the nodes meeting my requirement.<br> For eg,i need output as below,<br>
<br> <Record><br> <a><br> <a1>hi</a1><br> </a><br> <b><br> ---<br> </b><br> </Record> <br>
<br> <Record><br>
<a><br>
<a1>hello</a1><br>
.<br> .<br>Where input xml might contain 'n' number of Records.<br>I have been struggling to figure it out.I would be happy to get a solution for this. <br clear="all"><br>-- <br>Yours,<br>S.Selvam<br>