Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

How to generate XML file as follow, using XmlDocument.

Question posted by: Abhijit D. Babar (Guest) on June 27th, 2008 07:07 PM
Hello,
I have to generate XML file as follow, using XmlDocument.


<Company>
< Employee EID=”111” Description=” xyz”>
<Dept DeptNo=”D10”>
<FirstNameAbhijit </FirstName>
<LastNameBabar </LastName>
</Dept>
<Dept DeptNo=”D20”>
<FirstNameSahine </FirstName>
<LastNameGhavane </LastName>
</Dept>
</Employee>

< Employee EID=”222” Description=” abc”>
<Dept DeptNo=”D10”>
<FirstNameSwapnil </FirstName>
<LastNameChavan </LastName>
</Dept>
</Employee>
</Company>


I have to add Dept node at runtime and not fix number, Dept node added
will be between 1 to 10. Sometimes I will add 2 Dept nodes;
sometimes I will add 10 Dept nodes. New node will append at the end
position.
Also I have to search Employee node from its EID, and Delete
particular node from EID.
Also all Dept node will be display when we select Particular EID from
Employee Node

How can I do this. Please give me hint. Thanks

TOUDIdel's Avatar
TOUDIdel
Guest
n/a Posts
June 27th, 2008
07:07 PM
#2

Re: How to generate XML file as follow, using XmlDocument.

Uzytkownik "Abhijit D. Babar" <abhijitit94@gmail.comnapisal w wiadomosci
news:bc950e57-a967-4146-93e6-8212f9342353@v26g2000prm.googlegroups.com...
Hello,
I have to generate XML file as follow, using XmlDocument.
<Company>
< Employee EID=”111” Description=” xyz”>
<Dept DeptNo=”D10”>
<FirstNameAbhijit </FirstName>
<LastNameBabar </LastName>
</Dept>
<Dept DeptNo=”D20”>
<FirstNameSahine </FirstName>
<LastNameGhavane </LastName>
</Dept>
</Employee>

< Employee EID=”222” Description=” abc”>
<Dept DeptNo=”D10”>
<FirstNameSwapnil </FirstName>
<LastNameChavan </LastName>
</Dept>
</Employee>
</Company>

Quote:
>I have to add Dept node at runtime and not fix number, Dept node added
>will be between 1 to 10. Sometimes I will add 2 Dept nodes;
>sometimes I will add 10 Dept nodes. New node will append at the end
>position.
>Also I have to search Employee node from its EID, and Delete
>particular node from EID.
>Also all Dept node will be display when we select Particular EID from
>Employee Node
>How can I do this. Please give me hint. Thanks


Show us your code
--
td



 
Not the answer you were looking for? Post your question . . .
189,162 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors