My question is about the DOM - will the 2 DOM trees be the same?
According to your answer, they should be different.
 
As far as I can check, they are the same !
So after parsing the XML to DOM, I can't tell whether it was "a" having empty string, or 'a" with no content.
 
I need some way to know from DOM tree which of the 2 XMLs it was...
 
    Evyatar
-----Original Message-----
From: Tobbi [mailto:[EMAIL PROTECTED]
Sent: Thu, June 20, 2002 3:08 PM
To: [EMAIL PROTECTED]
Subject: Re: <a/> and <a></a> different ?

   Hi,
I suppose that you don't get the same result parsing via SAX or DOM.
 
The difference is that <a></a> means: element "a" having an empty string as the child (or whitespace, I'm not sure)
On the other side <a/> means: element "a" with NO content, i.e. in DOM this element shouldn't have any childs.
 
   Tobbi
----- Original Message -----
Sent: Thursday, June 20, 2002 1:59 PM
Subject: <a/> and <a></a> different ?

Hi all,
 
Suppose I have one XML like this: <s><a></a></s>
and a second XML like this: <s><a/></s>
 
When I parse with a DOMParser, will I get the same DOM tree for both XMLs?
When I parse with SAX Pasrer, will I get the same SAX events for both XMLs?
 
TIA
    Evyatar
 

Reply via email to