C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Creating Multiple Sub Root Node


Posted Date: 16 Aug 2006    Resource Type: Articles    Category: .NET Framework
Author: siva kumarMember Level: Gold    
Rating: Points: 1



private void XMLNodes()
{
XmlDocument doc=new XmlDocument();
doc.Load(Server.MapPath("doc.xml"));
XmlNode root=doc.DocumentElement;
XmlElement ele=doc.CreateElement("emp");
XmlElement ele1=doc.CreateElement("eno");
ele1.InnerText=txt_eno.Text;
XmlElement ele2=doc.CreateElement("ename");
ele2.InnerText=txt_ename.Text;
XmlElement ele3=doc.CreateElement("IMI");
ele3.InnerText=txt_mno.Text;
ele.AppendChild(ele1);
ele.AppendChild(ele2);
ele.AppendChild(ele3);
root.InsertAfter(ele,root.LastChild);
doc.Save(Server.MapPath("doc.xml"));
}




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Can not enter duplicate chaildvalues in XML
Previous Resource: Reading Values From ChildNodes in XMl
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use