As far as I see, I think you can do that with the help of XDocument or XmlDocument:
classProgram
{
staticvoid Main(string[] args)
{
// this is only a sample, please use Load method to load your xml file// Parse will analyze an xml stringXDocument doc = XDocument.Parse("<Root><a></a></Root>");
(doc.Root.FirstNode asXElement).SetAttributeValue("attr", "a/b/c");
Console.WriteLine(doc.Root);
}
}
rajemessage
Member
2 Points
12 Posts
can i put / in xml as value of any attribute.
Dec 08, 2012 02:33 PM|LINK
Hi
i have one xml which i keep in database, then read it in asp.net and display its content on web page as value of any control.
i would like to know, can i keep / as value of any attribute as follows.
yours sincerly
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: can i put / in xml as value of any attribute.
Dec 09, 2012 02:59 AM|LINK
Hello,
As far as I see, I think you can do that with the help of XDocument or XmlDocument: