Re: [xml] byte offset in original document



On Thu, Oct 16, 2003 at 02:18:21PM +0200, Tamas Sarlos wrote:
Hi Daniel,

A simple question: in the saxCharacters callback, is it possible to know 
the exact byte offset in the original HTML document of the xmlChar *buf 
argument?

  Hum you can try to add ctxt->input->consumed and
 ctxt->input->cur - ctxt->input->base , but there is no garantee that
this is exact. I never checked so this may not work

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]