dimanche 30 mars 2014

Get all Names from xml-conduit


Vote count:

0




I'm parsing a modified XML from http://ift.tt/1iOW5PE


Here's what it looks like:



<?xml version="1.0" encoding="utf-8"?>
<population xmlns:xsd="http://ift.tt/tphNwY" xmlns:xsi="http://ift.tt/ra1lAU" xmlns="http://example.com">
<success>true</success>
<row_count>2</row_count>
<summary>
<bananas>0</bananas>
</summary>
<people>
<person>
<firstname>Michael</firstname>
<age>25</age>
</person>
<person>
<firstname>Eliezer</firstname>
<age>2</age>
</person>
</people>
</population>


How do I get a list of firstname and age for every person?


My goal is to use http-conduit to download this xml and then parse it, but I am looking for a solution on how to parse when there are no attributes (use tagNoAttrs?)



asked 49 secs ago

Lionel

832





Aucun commentaire:

Enregistrer un commentaire