Hey

I am pretty new to Python ( about a day old ). I am currently writing a small script to just cycle through an XML page and retrieve data if it exists. So for example an extract from the Xml page will have an element tagged entry like so

<element name="Something" type="Something" originalValue="">I want this data</element>

I can use the following loop to list out all element.name, element.type and element.originalValue like so

        for subtree in binderytools.pushbind('/screen/panel/list/row/element', source=xmlfile):
            print subtree.originalValue

source=xmlfile is just referencing a variable I have set to point to the actual xml page. How can I change the above loop to cycle through each <element ........ >, check if data exists like above and print this out.

Any help would be appreciated.
Thanks
k


--
"Behind every great man, there is a great woman. Behind that woman is Mr.T."
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to