marshal

Marshals a Javascript object into XML This method returns a newly created XML element or null if the object could not be parshaled because it was a part of a circular reference Parameters: parentElem - parent XML element where the newly created element should be added obj - object to be marshaled objStack - a context object used by the recursive marshal() calls to prevent circular references from being expanded. When marshal() method is called with a top-level object, this parameter should be null

_ObjectStack

registerEncoder

Registers a custom encoder Parameter: encoder - custom encoder instance that is expected to implement the following methods (see AdfMarshalingService._DE for reference): <String >getNamespace() - returns encoder's unique XML namespace getTypeMap() - returns a map whose keys are the supported Javascript types (functions), and the values are their corresponding XML element tag names. For example, the following code could be use to create a map: var map = new Object(); map[MyType] = "MyType"; //MyType is a Javascript class <void> encode(elem, obj, objStack, service) - marshals Javascript types into XML Parameters: elem - XML element representing the object to be marshaled. The element is created by the marshaling framework, and not this method. The framework is also responsible for setting the correct XML namespace obj - object to be marshaled objStack - a context object used by the marshaling framework to detect circular references. This parameter should be passed to the marshal() calls made by the encoder service - marshaling service instance. This instance should be used to delegate marshaling of other types to the framework (when marshaling object properties, for example)