Forum

HomeHomeCoreCoreSamples and oth...Samples and oth...How to Parse XML with Sub Nodes?How to Parse XML with Sub Nodes?
Previous
 
Next
New Post
4/18/2010 10:47 AM
 

My XML Looks like this:

<result>
<Full_Name>Test Contact</Full_Name>
<Full_Address/>
<visitors>
<visitor>
<id>1122352</id>
<browser>Firefox</browser>
<browser_version>3.6</browser_version>
<operating_system>Windows</operating_system>
<operating_system_version/>
</visitor>
<visitor>
<id>1122333</id>
<browser>IE8</browser>
<browser_version>8.0</browser_version>
<operating_system>Windows</operating_system>
<operating_system_version/>
</visitor>
</visitors>
</result>

Here, I can read XML using the XML tranform in QUery Action. But I am not able to Read Recursively the Visitors Node. How can I read Sub Nodes Recursively?

I'm trying to read XML using this sample:

http://www.openwebstudio.com/topic/SOAP_Samples.aspx

Thanks.


- Varun
New Post
4/20/2010 8:40 AM
 

Take a look at this sample, while its not using your XML structure, it should identify to you how this can be handled.


Kevin M Schreiner
R2Integrated / Open Web Studio
 Sample.Xml.Query.json.txt
New Post
4/21/2010 7:51 PM
 

Thanks Kevin.


- Varun
New Post
7/31/2010 12:24 PM
 

Is there a way to filter against a subnode value?

Example:

<root>
<pane>LeftPane
<module>Module1</module>
<module>Module2</module>
</pane>
<pane>RightPane
<module>Module3</module>
<module>Module4</module>
</pane>
</root>

And I would want to only pull the module values for say the "LeftPane"

New Post
7/31/2010 5:25 PM
 

I actually got it figured out. For those who need to know just add

root[pane='LeftPane'] as your path for this example. I am actually itterating through the xml and it's deeper than the example but works great.

Previous
 
Next
HomeHomeCoreCoreSamples and oth...Samples and oth...How to Parse XML with Sub Nodes?How to Parse XML with Sub Nodes?


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share