We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Rename xml node from a treeview

Thread ID:

Created:

Platform:

Replies:

10280 Jan 28,2004 09:59 AM Windows Forms 0
loading
Tags: FAQ
JJ
Asked On January 28, 2004 09:59 AM

Hi, I'm trying to rename xml node via treeview control. My current treeview displays xml structure on my treeview control. Now I'm trying to rename the selected node from my treeview and then rename it and hoping to see the changes on the xml document. This is my current code below. private void tvTreeView_AfterLabelEdit(object sender,System.Windows.Forms.NodeLabelEditEventArgs e) { //rename node to xml document string xpath_query = tvTreeView.SelectedNode.FullPath.Replace("\\", "//"); System.Xml.XmlNode node = tmpxmldoc.SelectSingleNode(xpath_query); node.InnerText = e.Label; tmpxmldoc.Save(theFilename); }

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;