| The LeafElementParser class implements ElementParser. It is used to parse
leaf elements in the message definition. If an ElementDefinition does not
specify a format definition, but does specify a datatype, then it is a leaf
element. Basic flow of the parse method: 1. Create a new Element with the
name and namespace provided in the ElementDefinition. 2. Read the entire
contents of the InputStream. It is assumed that the InputStream contains only
data for this element at this point. 3. Based on the datatype of the
ElementDefinition, format the data appropriately. Note that in the first
version, the only supported datatype will be String, and therefore, no
reformatting is necessary. 4. Create a new Text Node containing the formatted
data from the InputStream. 5. Append the Text Node to the new Element. 6.
Return the Element.
|