RxCialisKaufenBillig
New Member
I am trying to write a python program that uses DOM to read xml file and print another xml structure that list from only one node with particular selected attribute "fun".\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><Website><url category="fun"><title>Fun world</title><author>Jack</author><year>2010</year><price>100.00</price></url><url category="entertainment"><title>Fun world</title><author>Jack</author><year>2010</year><price>100.00</price></url></website>\[/code\]I couldn't select the list from the URL having category="fun".I tried this code:\[code\] for n in dom.getElementsByTagName('url'): s=n.attribute['category'] if(s.valuehttp://stackoverflow.com/questions/12651988/=="fun"): print n.toxml()\[/code\]Can you guys help to me to debug my code?