XML Getting the SecondChild?

IN the following XML I understand how to get the ‘model’ using:

nodes = xml.XQL("//model") node.FirstChild.Value


<?xml version="1.0" encoding="utf-8"?> <response> <result>success</result> <get_order_detail_response> <products> <product> <id>1725</id> <model>HAI15SC</model> <name>THING1></name> <upc>234324234</upc> <quantity>1</quantity> <scans_required>1</scans_required> <scans> <scan>CPU</scan> </scans> </product> <product> <id>611</id> <model>CTR350</model> <name>THING2</name> <upc>3452345345</upc> <quantity>2</quantity> <scans_required>3</scans_required> <scans> <scan>CPU</scan> <scan>MAC Address</scan> <scan>Serial Number</scan> </scans> </product> </products> </get_order_detail_response> </response>

What Im trying to figure out is how do I get the three ‘scan’ values for the CTR350?

firstchild gives a xmlnode and there you can ask for nextsibiling.

You might want to get “//product” first, and then get the details from each individually, either with another xql, or just by traversing the tree structure. I usually package this sort of thing into a class structure where I can use methods like getFirst and getNext. I think I might write an article about it for Marc’s XDev magazine.