element name checking is not a part of validation, rather XML 1.0
conformance checking. If your xml is not conformant, XML Document will not
load it.
> I can create this xml document, but can't read it from file into
> XmlDocument object. It complains about the first charactor in node
[quoted text clipped - 3 lines]
>
> Is there a way to turn off validation during XmlDocument.Load?
BD - 26 Sep 2004 18:06 GMT
In my project, investment transactions are organized by date (yyyymmdd).
Such as:
<Account1>
<20021231>
<buy><ibm>20</ibm></buy>
<sell><aol>100</aol></sell>
</20021231>
<20030102>
<buy><csco>200</csco></buy>
<sell><msft>100</msft></sell>
</20030102>
</Account1>
If I can load this xml into XmlDocument object, I can reference any dates
easily, such as:
If (doc["Account1"][20021231] != null) { do something...}
Now, with this xml restriction, how should I go about it?
Thanks,
Bo
Chris Lovett - 27 Sep 2004 08:12 GMT
Just stick the letter "d" in front of each date as the name of those
elements and then it will be proper XML.
> In my project, investment transactions are organized by date (yyyymmdd).
> Such as:
[quoted text clipped - 20 lines]
>
> Bo
> I can create this xml document, but can't read it from file into
> XmlDocument object. It complains about the first charactor in node
[quoted text clipped - 3 lines]
>
> Is there a way to turn off validation during XmlDocument.Load?
If you do not comply with the well-formedness rules then your markup is
not XML and thus rejected by the parser. So the error you get is not a
validation error but a well-formedness error, your element name is not
allowed to start with a digit.

Signature
Martin Honnen
http://JavaScript.FAQTs.com/