Xpath, Python, and Strange XML

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 1000 Views - Last Post: 19 January 2012 - 08:41 AM Rate Topic: -----

Topic Sponsor:

#16 Wuzseen  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 72
  • Joined: 04-October 11

Re: Xpath, Python, and Strange XML

Posted 19 January 2012 - 08:41 AM

Awesome, I think I've got something I can take and run with now. I had to finangle the data method so that I could have a list of values for each key, I was able to mesh some various solutions found on the 'ole google together and came up with the following

    def data(self, data):
        if self.current_tag == 'Value':
                self.result_data.setdefault(self.current_name, []).append(data)


Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2