Syntax
set anObject = aBlob.xmlToClass();
Semantics

The operation takes an XML buffer as blob (aBlob) and tries to map the XML document to anObject. If this is not possible, an error is raised (e.g. XML parser errors, invalid mappings, etc.).

Frequently, an XML document is given as a string instead of a blob. In such cases, it is possible to apply xmlToClass() to a string as well. For details see xmlToClass.

SubstitutablesaBlobCan be any variable or object attribute having the type Blob.
anObjectTarget object, can be any object.
Error CodesFind the related error codes on Log Errors of domain XMLLM.
XMLLM/3The native XML parser reported a fatal error during parsing. Read more on  Troubleshooting the XML Serialization for more information if you cannot resolve such errors.
Examples

The action script below creates an object of type Address. An output object named myAddress of type Address needs to be defined.

create myAddress;
set myAddress = addressAsXMLDocument.xmlToClass();

Beneath, a sample XML document is shown to illustrate the executed mapping. The XML document is mapped to an instance of Address as shown in the class diagram.

XML SourceTarget Class Structure
<myAddress id="myAddressID">
<street>108, Kearny Avenue</street>
<city>Newark</city>
</myAddress>
Note, that the XML element myAddress is mapped to the object myAddress, which is of type Address. This type has the UML attribute id which corresponds to the XML attribute id. Additionally, the XML elements street and city are mapped to the association ends city respectively street. Both are having the type String.

XML Parsing Options (Validation against a Schema)