<things>
<fruit>apple</fruit>
<hardware>mouse</hardware>
...
</things>
Turn it into:
{'things':[{'fruit':'apple'}, {'hardware':'mouse'}]}
Is there an easy way to do this? Thanks.
<things>
<fruit>apple</fruit>
<hardware>mouse</hardware>
...
</things>
Turn it into:
{'things':[{'fruit':'apple'}, {'hardware':'mouse'}]}
Is there an easy way to do this? Thanks.
there's a nice recipe for that here:
http://code.activestate.com/recipes/570085/
another good one is here: