[Top][All Lists]

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

FW: [DotGNU]System.Xml

From: Simon Guindon
Subject: FW: [DotGNU]System.Xml
Date: Wed, 8 Jan 2003 13:02:08 -0500

Ok we got the basic DOM structure created now, I have a slight problem
though, TEXT nodes are being added to a nodes .ChildNodes array when you do
a .InnerText = somestring

Is this the desired result?  I know from extensive use of the .NET
System.Xml that text does not show up as nodes in the .ChildNodes
collection.  Currently our nodes hold text, and link to each other in the
document, all seems to be well, except that when you add body to a tag, IE
<node>Test</node> Test ends up being a child node of node.  I know people
keep saying don't use .NET as a reference, but I truly believe something is
wrong here.

Inside the InnerText in XmlNode and XmlElement classes modifier, they both

Any ideas?


Simon Guindon
Nureality Networks

-----Original Message-----
From: Rhys Weatherley [mailto:address@hidden
Sent: January 7, 2003 4:57 AM
To: Simon Guindon; Portable. NET
Subject: Re: [DotGNU]System.Xml

On Tuesday 07 January 2003 07:11 pm, Simon Guindon wrote:

> Anyways, we have the chicken and the egg problem here.
> XmlDocument.LoadXml uses XmlTextReader to load structure into XmlDocument.
> Problem here is, should LoadXml do the Appending of children and
> attributes, or should XmlTextReader do this internally with a XmlDocument
> privately in it.  Currently thats how we have it, but then how do we get
> the structure to the main XmlDocument.

Mark the document field in XmlTextReader as "internal".  Or add an
method called "GetDocument()" or something.  Then access that from "LoadXml"
after the parse completes.

> My initial thoughts were that XmlTextReader ONLY did parsing of the text,
> and the DOM creation happened in XmlDocument, but used XmlTextReader to
> parse.

That's how other implementations work.  But that doesn't mean that we have
do it the same way.  Building the document in XmlTextReader is fine by me,
long as the non-document API functions sufficiently to fool apps that use

There are some advantages to using the node forms internally: the rest of
XmlNode code can be reused to implement bits of XmlTextReader, rather than
having to duplicate that work.  Anyway, at this point the motto is "whatever



Developers mailing list

reply via email to

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