Re: [lxml] attrname - get value of attrname

The result of tree.xpath('//meeting/@*') is already a list of attribute
A key thing is, well 2; other than with my eyes what is a good way with lxml to check that the values i am obtainjng are correct especially when as i am going over multiple files. Should I be randomly generating a file in reverse and comparing to the original? Second the xml is only 4 levels deep with 5 main nodes comprising these levels. However each node is attribute heavy (10+). While i have used getchildren etc to reduce looping down i still have looped down to the main extent. Each line of my csv output contains details from each node. So abstracted thats my flow start at root grab a few and at each level repeat and then create a line for csv written later. How do you approach these tasks? Thanks Sayth
participants (1)
-
Sayth Renshaw