Home How do I parse XML in Python?
Reply: 0

How do I parse XML in Python?

user458 Published in March 20, 2018, 5:27 pm

I have many rows in a database that contains xml and I'm trying to write a Python script that will go through those rows and count how many instances of a particular node attribute show up. For instance, my tree looks like:

      <type foobar="1"/>
      <type foobar="2"/>

How can I access the attributes 1 and 2 in the XML using Python?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.341825 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO