Package | org.spicefactory.lib.xml.mapper |
Interface | public interface PropertyHandler |
Implementors | AbstractPropertyHandler |
Property | Defined By | ||
---|---|---|---|
nodeKind : String [read-only]
The kind of the mapped node. | PropertyHandler | ||
property : Property [read-only]
The Property the XML element, attribute or text node should map to. | PropertyHandler | ||
xmlNames : Array [read-only]
The names of the mapped XML elements, attributes or text nodes. | PropertyHandler |
Method | Defined By | ||
---|---|---|---|
toObject(nodes:Array, parentInstance:Object, context:XmlProcessorContext):void
Maps the specified XML elements, attributes or text nodes to the mapped property of the specified instance. | PropertyHandler | ||
toXML(instance:Object, parentElement:XML, context:XmlProcessorContext):void
Maps the property value this handler is responsible for to the specified XML elements. | PropertyHandler |
nodeKind | property |
nodeKind:String
[read-only]
The kind of the mapped node. Either element
, attribute
or text
.
public function get nodeKind():String
property | property |
property:Property
[read-only] The Property the XML element, attribute or text node should map to.
public function get property():Property
xmlNames | property |
xmlNames:Array
[read-only] The names of the mapped XML elements, attributes or text nodes. For Array properties the Array may contain more than one XML name.
public function get xmlNames():Array
toObject | () | method |
public function toObject(nodes:Array, parentInstance:Object, context:XmlProcessorContext):void
Maps the specified XML elements, attributes or text nodes to the mapped property of the specified instance.
Parameters
nodes:Array — the XML elements, attributes or text nodes to apply as a property value
| |
parentInstance:Object — the instance the property should be set for
| |
context:XmlProcessorContext — the processing context
|
toXML | () | method |
public function toXML(instance:Object, parentElement:XML, context:XmlProcessorContext):void
Maps the property value this handler is responsible for to the specified XML elements.
Parameters
instance:Object — the instance the to read the property value from
| |
parentElement:XML — the XML element to apply the property value to, either as an attribute, text node or child element
| |
context:XmlProcessorContext — the processing context
|