Got it, thanks  :)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 2005å1æ5æ 15:36
To: xerces-c-dev@xml.apache.org
Subject: Re: Is <myroot> </myroot123> valid for Xerces parser?


> Hi,
> 
> I have an xml document:
> <myroot>
> <test>fdfds</test>
> </myroot123>
> 
> And I use XercesDOMParser to parser this documentation. In my thought, 
it should be invalid
> for the root tag is not the exactly same, but I got the right dom tree. 
After I write this dom tree back,
> it changed to:
> <myroot>
> <test>fdfds</test>
> </myroot>
> Is it the right behavior of XercesDOMParser with default parser option? 
I use other browse to open
> this document, such as IE, it report grammar error.

The issue is not if it's valid -- it's not even well-formed, so it cannot 
be valid.

Do you have an ErrorHandler instance installed in the parser?  If not, the 
parser will continue, and attempt to recover from the error.  In the case 
of building a DOM instance, it's already created the document element, so 
it's not surprising you get the "right dom tree."

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to