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.).
By default the following mapping rules apply:
- XML attributes are mapped to class attributes.
- XML elements are mapped to class associations ends.
These default rules can be overridden by using <<XMLElement>>, <<XMLAttribute>> , and <<XMLCharacters>> stereotypes on UML class attributes and UML association ends. More about these mapping rules, stereotypes and tagged values (e.g. for number and date & time formatting) can be found in section XML - UML Class Mapping.
Note |
---|
|
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 unescapeURI. |