Hi,

I am new to XML. I have doubt. I am updating value of XmlAttributeCollection in XmlElement, whether my XmlElement gets updated or I need to go with some method to update my value in XmlElement. Here my code,

XmlElement xntemplate = xmldoc.SelectSingleNode("//TableTemplate//ColumnStateXML//state//colref [@id='" + sPropName[1].Trim() + "']") as XmlElement;

XmlAttributeCollection xattr = xntemplate.Attributes;

xattr["width"].Value = "2830";

Please suggest me to proceed.

Thanks in Advance.

Recommended Answers

Why don't you display it and see?

Jump to Post

All 2 Replies

Why don't you display it and see?

Hi Momerath,

My xntemplate and xmldoc has updated value. But when I tried to save in XML file, thing not getting updated.

FYI
Here I used to call common save method and this save method works better when calling from other event.

Any suggestion ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.