#86 Report byte offsets for attr names and values

Feature Request
Moses Hall

The attached patch exposes a new API for querying the byte offsets of attribute names and values. The new API is XML_GetAttributeInfo(), which returns a structure with four byte offsets: attribute name start & end, and attribute value start & end.

We use this new functionality in our indexing software at the University of Michigan Libraries; we needed to be able to index all parts of the source XML file, including attributes.

Patch is against the latest CVS sources. Thank you for your attention.


  • Moses Hall

    Moses Hall - 2011-11-30

    cvs diff -up

  • Karl Waclawek

    Karl Waclawek - 2012-03-03

    This patch was applied in expat.h rev 1.81 and xmlparse.c rev 1.168.
    It was implemented as a new conditional compile feature XML_FEATURE_ATTR_INFO.

  • Karl Waclawek

    Karl Waclawek - 2012-03-03
    • assigned_to: nobody --> kwaclaw
    • status: open --> open-accepted
  • Sebastian Pipping

    • status: open-accepted --> closed-fixed
    • Group: --> Feature Request
  • Sebastian Pipping

    Included in 2.1.0, commit is e3e81a6d9f0885ea02d3979151c358f314bf3d6d. Closing.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks