Re: [xml] memory usage question

On Wed, Aug 17, 2005 at 05:53:37PM +0200, Stefan Kost wrote:
Hi Daniel.

  The dictionnary is used by default if one use the new xmlReadxxx APIs.


Does xmlParseDocument(ctxt) use the dictionary. If looked over the
sources, but found no easy answer.

  depends how ctxt was built ! xmlReadxxx call xmlParseDocument !
If you call xmlParseDocument() directly, then I'm sorry you're attacking
at the lowest publicly available level of the API and there is no easy
answer. In general you should not call something like xmlParseDocument()
directly unless you have a good knowledge of libxml2 internal processing.
IIRC teh dictionnary is used if ctxt->dict() has been created and the
parser is running in version2 mode.

I noticed one thing. Inside parser.c several methods call
xmlParseDocument(ctxt). These methods call xmlDetectSAX2(ctxt) before,
which is something xmlParseDocument(ctxt) does too at the beginning.
Maybe be extra calls can be spared.

  Cost is low, and I fear troubles doing so.

Regarding wheter it used dictionaries I've also used the site search:

Does this support operators like AND (search for documents having both

  No it will use both word but not force an AND.

Could you please add a note to the search form to tell the
user either how to specify operators or that there are't any.

  There is no operator, why would you assume there is one ? If you want to
add operators search.php is in libxml2 doc CVS subdir !


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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