Solved

What's the best way to parse a XmlDocument.InnerXml?

Posted on 2009-04-07
2
1,211 Views
Last Modified: 2013-11-08
Hi, I'm using VS 2008 and .net 3.5.
How do I best parse out different node value inside a XmlDocument.InnerXml, which I beleive is a string value?  Or, would it better to parse using a XmlDocument object instead of a string object?  And please show a sample code on how I can do this if parsing the String object of XmlDocument.InnerXml.  Thank you.
0
Comment
Question by:lapucca
2 Comments
 
LVL 15

Accepted Solution

by:
spprivate earned 500 total points
ID: 24090728
You can use xpath.
Here is an example in previous version of .net

http://www.codeproject.com/KB/cpp/myXPath.aspx
0
 

Author Comment

by:lapucca
ID: 24091148
Hi Thanks for the link to the example.  However, that is using a xml file to read in.  In my class, I have a input parameter that is a string which is the result from "return xmldoc.InnerXml;" ,  It's a string from a xmlDocument.InnerXml.  How can I start parsing this with xpath?  Thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

947 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now