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 !




Can not enter duplicate chaildvalues in XML


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



XmlDocument XL=new XmlDocument();
XL.Load(Server.MapPath("TEST.xml"));
XmlNode Xnode=XL.SelectSingleNode("ITEMS");
foreach(XmlElement li in Xnode)
{
if(li.InnerText==TextBox1.Text)
{
Response.Write(li.LocalName.ToString());
return;
}
}

int i=Xnode.ChildNodes.Count;
i=i+1;
XmlElement ele=XL.CreateElement("TYPE"+i);
ele.InnerText=TextBox1.Text;
Xnode.AppendChild(ele);
Xnode.InsertAfter(ele,Xnode.LastChild);
XL.Save(Server.MapPath("TEST.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: Dot Net Framework
Previous Resource: Creating Multiple Sub Root Node
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