I'm trying to build a type of query GUI, which returns queries from a php script in xml format via an httpservice. Each query returns different results eg.
- rep with most and leat quotes
- store with highest $ value
I'm really stuck on how to display the queries and access the node names and values. Here's an example of an xml:
<node>
<action>query</action>
<quotes name="Most Quotes">
<first>John</first>
<last>Smith</last>
<quote_num>71</quote_num>
</quotes>
<quotes name="Least Quotes">
<first>Dave</first>
<last>Cook</last>
<quote_num>6</quote_num>
</quotes>
</node>
Id like to present the data in a readable way. Thanks
Here the example code for read your XML (it works perfectly):
Note: This code was created in actionscript 3, but should also work in your version. Please try it and tell me if will be useful, otherwise I'll have to post a code for your version. Remember that there are many ways to do this, i posted this way because maybe is more simple.
You can try this HERE.
Please visit this link for more explanation Working with XML
Second Version
You can try this HERE.
Check that in this new version, I iterate over each child using a "for" statement with increment variable.