[Top][All Lists]

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

Re: Linking Emacs with libxml2

From: Andrew W. Nosenko
Subject: Re: Linking Emacs with libxml2
Date: Fri, 10 Sep 2010 17:12:02 +0300

On Fri, Sep 10, 2010 at 13:46, Stefan Monnier <address@hidden> wrote:
>>> Hm.  I guess so.  I'll change the html-parse-buffer function into a
>>> html-parse-string function instead.
>> I think it is still useful to provide a html-parse-buffer function that
>> can be more efficient when the intermediate string copy is not needed.
> Agreed, but right now it's not clear when/how such an intermediate copy
> can be avoided.

Try the xml*IO family of functions.  E.g. instead of xmlReadDoc() try
xmlReadIO().  Indeed, the libxml2 doesn't need the whole document in
memory for parse it.  IO callbacks supply as mech as need data when it
requested by underlying parser.

> BTW, another question regarding libxml2: does it provide functions to do
> partial parses (e.g. to know the syntactic context of a particular
> buffer position)?
>        Stefan

Andrew W. Nosenko <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]