Re: libxml2 application data

Robin Berjon <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
On Dec 22, 2008, at 15:21 , Tod Harter wrote:
> Uh, isn't that the purpose of the 'id' attribute of an element?

No. The identity of an element and whatever allows you to refer to one  
of its nodes in memory are two completely orthogonal concepts. Using  
the ID can have any number of issues, e.g. loading the same tree twice  
but annotating differently, duplicate IDs in the tree (not valid, but  
still perfectly well-formed XML), or calling cloneNode on an element  
that has an ID. Note that it also only applies to elements (the OP  
said nodes). If the use case is constrained enough it could work, but  
it certainly isn't the primary purpose of ID.

-- 
Robin Berjon - http://berjon.com/
     Feel like hiring me? Go to http://robineko.com/





_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.