Object mapping from an XML element
Objects implementing ISOXNode are used to construct object structures
from XML elements. Each node gets to control how its subnodes are
created, and what will be passed back to its parent node once its
element subtree is complete. In the simplest possible case, one can
create a simple DOM-like tree of nodes which closely resemble the
original XML. Or, one can create a tree of objects with only minor
structural similarities, or even use nodes just to do "side-effect"
processing guided by the XML structures, like an interpretive parser.
Methods
|
|
_acquireFrom
_addNode
_addText
_finish
_newNode
|
|
_acquireFrom
|
_acquireFrom ( parentNode )
Parent-child relationship hook
Called on newly created nodes to give them a chance to acquire
context information from their parent node
|
|
_addNode
|
_addNode ( name, subObj )
Add finished sub-node subObj to node
|
|
_addText
|
_addText ( text )
Add text string text to node
|
|
_finish
|
_finish ()
Return an object to be used in place of this node in call to the
parent's _addNode() method. Returning None will result in
nothing being added to the parent.
|
|
_newNode
|
_newNode ( name, attributeMap )
Create new child node from name and attributeMap
Child node must implement the ISOXNode interface.
|
|