sri sri

sri sri

  • NA
  • 11
  • 0

XML File

May 6 2008 1:43 AM
Hi,

Below is my XML File named myxmlfile1.xml.

<Employees>

<employee id="1">
<emp>1</emp>
<name>aaa</name>
<age>25</age>
</employee>

<employee id="2">
<emp>2</emp>
<name>bbb</name>
<age>28</age>
</employee>

</Employees>

Now if I pass "employee" with id=1 from my front end only those tags need to copied to another xml file like

<employee id="1">
<emp>1</emp>
<name>aaa</name>
<age>25</age>
</employee>

The user wil not be knowing what child elements are there under employee id=1.
Using XPath, I am getting only the values like 1,aaa,25.I want to get the whole XML.

I am using asp.net with C#


Can any one tell me how to do this.

Answers (2)