Re: [xml] Detecting empty nodes



On Thu, Apr 17, 2008 at 09:49:43AM -0400, Jason Viers wrote:
neil scales wrote:
<MyXml>
   <default/>
</MyXml>


<MyXml>
   <default></default>
  

These are identical, by the definition of XML.  There is no way to 
detect the difference between the two, nor should there be.

  actually Microsoft managed to make a difference in the behaviour of
the xmlReader, which I tried to mimic as much as possible. Try 
  xmllint --stream --debug 
on both examples :-)

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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