Last post Feb 23, 2011 08:23 PM by Decker Dong - MSFT
Feb 21, 2011 05:02 PM|Rituranjan|LINK
Feb 21, 2011 11:54 PM|kavita_khandhadia|LINK
Provide a sample xml and the output you want.
Feb 22, 2011 08:36 AM|cool_cupid_jny|LINK
If You the Node name then u can use XPATH to do this..
Refer this link how to do it..
You can try it out with this link..
For more help post ur code..
hope it was useful..
Feb 23, 2011 12:10 AM|Decker Dong - MSFT|LINK
If your xml's node is unique and single. Suppose your xml looks like this:
Now try this:
var result = from e in XDocument.Load("xxx.xml").Root.Element("tag").Value;
Feb 23, 2011 05:48 AM|Rituranjan|LINK
how to fill this data in datset and find fathername using dataset
Feb 23, 2011 08:23 PM|Decker Dong - MSFT|LINK
According to your xml contents, I'm afraid that your xml contents has something wrong with its formation.
First, your xml contents doesn't have an end tag of "<root>".
Second, your xml cannot be recognized by DataSet. For DataSet or DataTable can only reconigze the xml contents with something like:
So based on my knowledge, I think you cannot use DataSet directly until you make a well-formatted with xml contents.
And anyway, I think you can change your xml contents like this below and find the "FatherName":
</Root> <!--Please add the ignored node...:)-->
var result = (from e in XDocument.Load("xxx.xml").Desendants("Fathername")).FirstOrDefault().Value;