Class
caplin.webcentric.model

XMLAdaptor

Constructor Summary

Attributes Name and Description
caplin.webcentric.model.XMLAdaptor()

Contains only static methods

Method Summary

Attributes Name and Description
<static> DataNode buildDataNode(XMLDOMDocument xmlDocument, DataNode parentNode, DataNode baseNode, bNonWebcentricXml)

<static> void buildNodeList(DataNode dataNode, XMLElement xmlElement, bNonWebcentricXml)

Create the childNodes for the supplied DataNode, building child dataNode elements from the child Nodes of the XMLElement.

<static> void encodeXmlAttributeValue( decodedValue)

Encodes any <, >, &, " and ' characters within the specified value to that they can be stored in an XML attribute.

<static> void extendDataNode( dataNode, xmlElement, withEvent, position, bNonWebcentricXml, dispose)

If position is other than -1, we replace the existing node

<static> void load( request, parentNode)

<static> void mergeDataNode( dataNode, xmlElement, bNonWebcentricXml)

Merge Rules: 1) Top level elements must be of same type Merge only operates 'one-level-deep' - we look at child nodes of the top level node, and if we find matches within the children of the top-level target node, we merge the two.

<static> void nodeLoadedHandler( DataNode, string)

<static> void serializeSelfOnly( dataNode)

Assigned dynamically to dataNodes using xref attribute.

Constructor Detail

caplin.webcentric.model.XMLAdaptor()

Contains only static methods

Method Detail

<static> DataNode buildDataNode(XMLDOMDocument xmlDocument, DataNode parentNode, DataNode baseNode, bNonWebcentricXml)

Parameters
XMLDOMDocument xmlDocument the XML input document
DataNode parentNode
DataNode baseNode - a preconstructed DataNode instance which will be augmented with attributes and childNodes.
bNonWebcentricXml
Returns
{DataNode} a DataNode constructed from xmlDocument.

<static> void buildNodeList(DataNode dataNode, XMLElement xmlElement, bNonWebcentricXml)

Create the childNodes for the supplied DataNode, building child dataNode elements from the child Nodes of the XMLElement. 'Content' nodes will be loaded synchronously (unless @defer is set to true).

Parameters
DataNode dataNode
XMLElement xmlElement
bNonWebcentricXml
Throws
DataException

<static> void encodeXmlAttributeValue( decodedValue)

Encodes any <, >, &, " and ' characters within the specified value to that they can be stored in an XML attribute.

Parameters
decodedValue

<static> void extendDataNode( dataNode, xmlElement, withEvent, position, bNonWebcentricXml, dispose)

If position is other than -1, we replace the existing node

Parameters
dataNode
xmlElement
withEvent
position
bNonWebcentricXml
dispose

<static> void load( request, parentNode)

Parameters
request
parentNode

<static> void mergeDataNode( dataNode, xmlElement, bNonWebcentricXml)

Merge Rules: 1) Top level elements must be of same type Merge only operates 'one-level-deep' - we look at child nodes of the top level node, and if we find matches within the children of the top-level target node, we merge the two. The xmlElement takes priority when we must resolve name conflicts (attributes)

Parameters
dataNode
xmlElement
bNonWebcentricXml

<static> void nodeLoadedHandler( DataNode, string)

Parameters
DataNode parentNode
string mode one of the values 'src' or 'xml' to determine whether the returned data be stored as raw xml or translated into a DataNode structure.

<static> void serializeSelfOnly( dataNode)

Assigned dynamically to dataNodes using xref attribute. We want to preserve the xref pattern when serializing - ie we don't want to serialize the copied content.

Parameters
dataNode