[xml] Pointers in a struct _xmlNode for entities



I have a question about the internal representation of entities in a
tree built by libxml2.

Assuming I've got entity substitution turned off, am I right in thinking
the following?
(i) below my XML_DTD_NODE I will have various XML_ENTITY_DECL nodes,
with the declaration as "children", and these children having a "parent"
pointer back to the XML_ENTITY_DECL node.
(ii) within the body of the document, I will have XML_ENTITY_REF_NODE
nodes of which the "children" and "last" pointers will point to the
first and last children of the XML_ENTITY_DECL node.
(iii) hence, for the XML_ENTITY_REF_NODE nodes, the relation
(node->children->parent != node) holds.

Or have I misunderstood?  Thanks in advance! (I'm about to write some
complex GUI code that allows users to edit entities in-place and have
all references auto-update visually, and I want to be sure of the
implementation details)

-- 
David Malcolm
www.conglomerate.org




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