C3 XML Question

  • Thread starter Thread starter Asim Qazi
  • Start date Start date
A

Asim Qazi

Hi All,

i m trying to Edit a Node which is CDATA, here is the code.

XE.Load(fileName);

XmlNode xIpLessDomainIP =
xWebServerRole.SelectSingleNode("//data/info[@name='ipless-domain-ip']");
xIpLessDomainIP.InnerText = "TestIPTest";


XE is a object of XMLDocument, it runs successfully but removes the CDATA
Section from the Node.

Any Help would be appriciateable

Thanks
Asim
 
Asim Qazi said:
i m trying to Edit a Node which is CDATA, here is the code.

XE.Load(fileName);

XmlNode xIpLessDomainIP =
xWebServerRole.SelectSingleNode("//data/info[@name='ipless-domain-ip']");
xIpLessDomainIP.InnerText = "TestIPTest";


XE is a object of XMLDocument, it runs successfully but removes the CDATA
Section from the Node.

Well, you're completely replacing the inner text, so I'm not entirely
surprised it's removing the existing text. Have you tried appending
child text nodes instead of setting the InnerText property?
 
Back
Top