XML markup can contain a subset of node types (comments, PIs, maybe CDATA) before and after the root node (which is always a TagNode). at the moment these might only be accessible by fetching siblings from the root node, i'm not sure though.
i propose to add two properties to the Document class: head_nodes and tail_nodes that should mostly behave like lists (with an additional prepend method).
i'm not sure whether or not it should be possible to 'hop' from the last / first items in these to the root node (with next_node and previous_node) and vice versa.
XML markup can contain a subset of node types (comments, PIs, maybe CDATA) before and after the root node (which is always a
TagNode
).at the moment these might only be accessible by fetching siblings from the root node, i'm not sure though.i propose to add two properties to the
Document
class:head_nodes
andtail_nodes
that should mostly behave like lists (with an additionalprepend
method).i'm not sure whether or not it should be possible to 'hop' from the last / first items in these to the root node (with
next_node
andprevious_node
) and vice versa.