Hi i want to parse xml file into json dump. Already tried this:
for i in cNodes[0].getElementsByTagName("person"):
self.userName = i.getElementsByTagName("login")[0].childNodes[0].toxml()
self.userPassword = i.getElementsByTagName("password")[0].childNodes[0].toxml()
self.userNick = i.getElementsByTagName("nick")[0].childNodes[0].toxml()
But i want to get titles and values in format title:value, using for loop.
<user>
<person>
<nick>Gamer</nick>
<login>1</login>
<password>tajne</password>
</person>
<properties>
<fullHp>100</fullHp>
<currentHp>25</currentHp>
<fullMana>200</fullMana>
<currentMana>124</currentMana>
<premiumAcc>1</premiumAcc>
</properties>
This is my xml format.