The input deserialization API uses the following steps to create a VisualAge Smalltalk object or objects from the contents of an XML input stream, a DTD, and a mapping specification defined in XML.
If you are using the object cache, you can retrieve the mapping specification from the cache instead of performing step 2.
For more information on mapping exceptions goto the Handling Mapping Exceptions section.
The following method is provided in the AbtDOMElement class:
The following methods are provided in the AbtDOMDocument class:
The following Smalltalk code creates a VisualAge Smalltalk object from the contents of an XML input stream, a DTD, and an interface mapping specification:
| domSource mapSpec orderObject| "Parse the input XML" domSource := (AbtXmlDOMParser newValidatingParser) parseURI: 'd:\workspce\xml\hld\serialize\order.xml'. "Create a mapping specification from the mapping XML" mapSpec := AbtXmlMappingSpec from: 'd:\workspce\xml\hld\serialize\order.map'. "Optional, add DTD to the object cache " domSource dtd addToXmlObjectCache. "Create objects from input DOM by applying rules from the mapping spec" orderObject := domSource mapUsing: mapSpec.