The MOE approach: A series of nodes
-
A single kind of event
Every MOE object and event is built on a single interface,
CoreComponentI
. These reports can come at varying levels of granularity, from the start of an element or attribute to a complete document and all of its content. These objects can also listen to other objects arriving and build a tree until they are complete.
-
Flexible nodes
Every node can contain a three-part (namespace-aware) name, ordered content, unordered content, and annotations. This means that attributes can contain entity references and preserve that information. It also means that an internal representation of XML can do things (like elements inside attributes) that XML itself doesn't support - but these will be suppressed if the node is written back to XML. Nodes can also be mutable. (Annotations are really useful for decorations like XML Schema PSVI information and CSS formatting information.)
-
Extensibility throughout
As long as you support
CoreComponentI
, you can make any object into a MOE component, and you can use the annotations feature to add any kind of object to MOE components without even doing that. You'll have to write logic that understands the annotations, but the fundamentals are really simple.
-
Events to trees and back again
MOE components can be built as trees or individual events. Components can 'read off' their tree contents as events, and components can also listen to events to build trees. (Simple listening requires well-formed trees, but trees can also be built by methods which have their own logic.)
Previous Page <
TOC
> Next Page