[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

XML Parsing in compact framwork

Posted on 2006-04-04
2
Medium Priority
?
258 Views
Last Modified: 2010-04-16
Hi,

If I have a XML file like this:

<?xml version="1.0" encoding="utf-8" ?>
<orders>
      <order>
            <number>80000001</number>
            <custName>Test Cust</custName>
            <items>
                  <item>
                        <id>35000019</id>
                        <received>no</received>
                        <code>10095</code>
                  </item>
                  <item>
                        <id>35000020</id>
                        <received>no</received>
                        <code>10011</code>
                  </item>
                  
            </items>
      </order>
</orders>

If c# compact framework what is the best way to loop over the items table for a given order. I have the order table in a foreach loop so for each order I want to loop over the items table?

Thanks Kieran.
0
Comment
Question by:kplonk
2 Comments
 
LVL 8

Accepted Solution

by:
navalarya1982 earned 150 total points
ID: 16378523
0
 
LVL 7

Expert Comment

by:mmarksbury
ID: 16384606
You could use XPATH to select all the ITEM nodes under a particular ORDER node.  

I believe the code is XmlDocument.SelectNodes(xpathExpression).
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question