Click here to Skip to main content
15,749,352 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

How to use XML Parsing in ASP.Net using web service. Can anyone tell and give sample?

You can do this a number of ways.

Using XmlDocument and XmlNode etc.[^]

Using Xml Linq....e.g.

XDocument posLog = XDocument.Load(posLogPath);
XNamespace ns = "";

// Query the data and write out a subset of contacts
var transactions = from transaction in posLog.Descendants(ns + "Transaction")
where transaction.Descendants(ns + "SomeRequiredCriteria").Any()

Try google, there are lots of examples of both techniques
Share this answer
Oshtri Deka 18-May-12 3:36am    
Good answer. 5.
XML parsing is performed the ame way, regardless of the platform ( app, web service, windows service, winforms app, etc). I would use Xml.Linq personally because those classes are easier to deal with than the legacy .Net classes.

Parsing XML is too big of a topic to discuss in its entirety in Quick Answers. Google is your friend.
Share this answer
Oshtri Deka 18-May-12 3:36am    
Excellent answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900