Re: [xml-dev] SAX Locator vs {start,end}Entity

From
Karl Waclawek <>
To
Date
2003-02-20T18:12:15Z
ID
<006301c2d90b$98dc0960$9e539696@citkwaclaww2k>
Thread
Re: [xml-dev] SAX Locator vs {start,end}Entity
> >But why can't you achieve that by looking at the systemId() of the
> >Locator when startElement is called?
> 
> I could keep a stack of the locator's system ID for all elements, and
> compare it with the top of stack for each element - if it's different,
> there must have been an entity boundary - but it would be more
> efficient to notice start and endElement events.  It looks as if it
> will be best to notice the events, but delay finding the system ID
> until an element start occurs.

Why not store the entity declarations in a hash table, hashed by name?

Karl