rich
February 10th, 2006, 11:07 AM
I'm wondering if anyone has any advice on processing xml docs (pref. in python).
I'd like to turn a xml doc into a list of xpaths relating to each bit of data. Something like
<apple>
<size>4</size>
<colour>blue</colour>
</apple>
<plum>
<size>2</size>
<colour>pink</colour>
</plum>
would be turned into
/apple/size
/apple/colour
/plum/size
/plum/colour
It sounds like a perfectly reasonable thing to do, but I cannot find a function that I can recycle.
Anyone ?
cheers,
Rich
I'd like to turn a xml doc into a list of xpaths relating to each bit of data. Something like
<apple>
<size>4</size>
<colour>blue</colour>
</apple>
<plum>
<size>2</size>
<colour>pink</colour>
</plum>
would be turned into
/apple/size
/apple/colour
/plum/size
/plum/colour
It sounds like a perfectly reasonable thing to do, but I cannot find a function that I can recycle.
Anyone ?
cheers,
Rich