[xml] libxml2 equivalents for expat's XML_GetCurrentByteIndex and XML_GetCurrentByteCount
- From: Graham Leggett <minfrin sharp fm>
- To: xml gnome org
- Subject: [xml] libxml2 equivalents for expat's XML_GetCurrentByteIndex and XML_GetCurrentByteCount
- Date: Thu, 18 Oct 2012 16:35:25 +0200
Hi all,
I am currently tasked with replacing the expat parser within an application with the more lenient html parser
found in libxml2.
I am using the parser to work out the location within the document of certain elements (tags), and once I
have found the element I am looking for, I need to know the offset of the element from the start of the
document, and the length of the element. These two bits of information are provided by expat in
XML_GetCurrentByteIndex() and XML_GetCurrentByteCount() respectively.
I am struggling to find equivalents of these functions inside libxml2.
I can see inside the parser structures, but I cannot find a clear explanation as to what the fields in those
structures represent, and what kind of maths I would need to do on them to derive the two bits of information
I am looking for.
Is there an API call that I should be using for this? Failing that, which fields of the parser should I be
looking at to calculate this information?
Regards,
Graham
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]