Part II. XML Handling

# XML Handling

A CongNodePtr is a libxml2 xmlNodePtr; originally it was something else, though. It's a node in the DOM tree of the document. Everything is stored in UTF-8 internally. There are some CongNode operations, and these are generally convenience wrappers around libxml2.

A CongLocation is a small struct which identifies a "location" in the document (e.g. for storing the cursor location). It's got a pointer to a node in the document tree, together with an offset into the content of the node, which is only relevant for TEXT and COMMENT nodes. It's the number of bytes, rather than the number of characters.