Site Navigation:


General rules about object-XML binding

The following rules are important to keep in mind when designing a binding specification:

  • The XML document has a tree-like structure. The SoftBeans collection to be bound has an equivalent structure in which you navigate through associations. The root of the XML document is represented by the root of the SoftBeans collection.

  • Each object's XML data must be enclosed inside a specific XML element tag. You cannot mix the data of two different objects inside the same XML element.

  • The content of an SoftBean's simple property may be bound either directly as text content of the SoftBean's current element, as attribute's content of the SoftBean's current element, or as text content of a sub-element from the SoftBean's current element.

  • A binding rule authorize to bind a given object property's name to a different XML element or attribute name.

  • An indexed or mapped property gives access to a sub-object that is bound to a sub-element of the SoftBean's current element.

  • XML data order is generally significant. The order in which XML elements and sub-elements appear in the document is defined by the specification. This order is applied when rendering a XML document from a SoftBean's root. But the order is not significant when building a SoftBean's collection from a XML document.

  • When a SoftBean provides access to a collection of sub-objects, these objects are rendered in the order in which they appear in the collection. When reading the XML document, sub-objects are inserted in the collection in the order in which they appear in the XML document.