[XML-SIG] newbie question
Chris Meyers
chris@hddesign.com
Thu, 17 May 2001 15:01:47 -0500
Ok I have been looking at PyXML for a couple of days now, and I still can't really find a good example of the basic stuff I need to do. I want to read in an XML file, traverse the tree and pull out information. For example I would like to go through this xml:
<?xml version="1.0" encoding="UTF-8"?>
<report>
<data>
<rec>
<fld id="1">123</fld>
<fld id="2">John></fld>
<fld id="3">Smith></fld>
</rec>
</data>
</report>
>From this xml I would like to pull out the id attributes and the values from the <fld> elements. I can do this in jython with jdom easily enough, but I need to use python for my current application
If someone could point me in the right direction as to where to look to find an example similar to what I am trying to do, I would really appreciate it.
Thanks,
Chris