Re: [xml] sax and entities



On Sat, Jun 16, 2007 at 04:11:09AM -0400, Daniel Veillard wrote:
On Sat, Jun 16, 2007 at 08:48:02AM +0200, Petr Pajas wrote:
SAX.startElement(a)
SAX.getEntity(b)
SAX.characters(B, 1)
SAX.characters(B, 1)  <--- why?

  One when parsing the entity to make sure it's well formed the first time
you use the entity.
  One each time the entity must be delivered to user land.


 One important point is to ask the parser to do entity substitution
if you provide your own SAX routines so it does as much of the work as
possible.

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]