[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: [DotGNU]System.Xml

From: Rhys Weatherley
Subject: Re: FW: [DotGNU]System.Xml
Date: Thu, 9 Jan 2003 08:52:15 +1000
User-agent: KMail/1.4.3

On Thursday 09 January 2003 06:24 am, Simon Guindon wrote:
> Thats exactly my point, but currently in PNET System.Xml in XmlNode and
> XmlElement they both append a new child to the current node when you add a
> string to InnerText.

Which is precisely what it is supposed to do (it actually doesn't append: it 
removes the current contents and then adds a new child).

InnerText refers to the "text of the nodes which are inside the current node".  
i.e. the children, not the node itself.  You'll also notice "InnerXml" and 
"OuterXml" properties.  "InnerXml" only gives the you the XML for the 
contents.  "OuterXml" includes the node itself.

> So I ask, is it correct to totally scrap this and just make a simple string
> property?

XmlText already has properties for manipulating text contents, and its 
"InnerText" does indeed update the "real text".

As far as I'm aware, the current system is doing exactly what it should.  
Please do not change this to a property as it will break the API - it will be 
no longer possible for callers to walk the list of child nodes to find the 
text as an alternative to using "InnerText".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]