com.highdeal.hci
Interface XMLOutputter

All Known Implementing Classes:
XMLOutputterWriter, XMLUTF8OutputterWriter

public interface XMLOutputter

This Java interface provides the necessary methods to output XML documents in an event-based manner; Consider the Java classes that implement this interface.

Use the following customizing sequence when outputting XML:

Caution

Your implementation must apply the sequence order.


Method Summary
 void addAttribute(java.lang.String name, java.lang.String value)
          Adds an attribute of type string to the current XML tag.
 void addBigIntegerAttribute(java.lang.String name, java.math.BigInteger value)
          Adds an attribute of type big integer to the current XML tag.
 void addBooleanAttribute(java.lang.String name, boolean value)
          Adds an attribute of type boolean to the current XML tag.
 void addCharacterData(java.lang.String data)
          Adds character data for the current XML tag.
 void addDateAttribute(java.lang.String name, java.util.Date value)
          Adds an attribute of type date to the current XML tag; Dates are encoded using ISO 8601 format, that is: 'YYYY-MM-DD'.
 void addDateTimeAttribute(java.lang.String name, java.util.Date value)
          Adds an attribute of type date and time to the current XML tag; Date and times are encoded using ISO 8601 format, that is: 'YYYY-MM-DDTHH:MM:SS.mmm'.
 void addDecimalAttribute(java.lang.String name, java.math.BigDecimal value)
          Adds an attribute of type decimal to the current XML tag.
 void addIntegerAttribute(java.lang.String name, java.lang.Integer value)
          Adds an attribute of type integer to the current XML tag.
 void addLongAttribute(java.lang.String name, java.lang.Long value)
          Adds an attribute of type long to the current XML tag.
 void endTag(java.lang.String tag)
          Ends the XML tag.
 void marshal(java.lang.String tagName, IXMLMarshallable child)
          Marshals a node into this writer.
 void startTag(java.lang.String tag)
          Starts a XML tag.
 

Method Detail

startTag

void startTag(java.lang.String tag)
Starts a XML tag.

Parameters:
tag - The name of the XML tag to start with

addAttribute

void addAttribute(java.lang.String name,
                  java.lang.String value)
Adds an attribute of type string to the current XML tag.

Parameters:
name - The name of the attribute
value - The text value of the attribute

addDecimalAttribute

void addDecimalAttribute(java.lang.String name,
                         java.math.BigDecimal value)
Adds an attribute of type decimal to the current XML tag.

Parameters:
name - The name of the attribute
value - The numerical value of the attribute

addDateAttribute

void addDateAttribute(java.lang.String name,
                      java.util.Date value)
Adds an attribute of type date to the current XML tag; Dates are encoded using ISO 8601 format, that is: 'YYYY-MM-DD'.

Parameters:
name - The name of the attribute
value - The date value of the attribute

addDateTimeAttribute

void addDateTimeAttribute(java.lang.String name,
                          java.util.Date value)
Adds an attribute of type date and time to the current XML tag; Date and times are encoded using ISO 8601 format, that is: 'YYYY-MM-DDTHH:MM:SS.mmm'.

Parameters:
name - The name of the attribute
value - The value of the attribute

addBooleanAttribute

void addBooleanAttribute(java.lang.String name,
                         boolean value)
Adds an attribute of type boolean to the current XML tag.

Parameters:
name - The name of the attribute
value - The value of the attribute

addIntegerAttribute

void addIntegerAttribute(java.lang.String name,
                         java.lang.Integer value)
Adds an attribute of type integer to the current XML tag.

Parameters:
name - The name of the attribute
value - The integer value of the attribute

addLongAttribute

void addLongAttribute(java.lang.String name,
                      java.lang.Long value)
Adds an attribute of type long to the current XML tag.

Parameters:
name - The name of the attribute
value - The value of the attribute

addBigIntegerAttribute

void addBigIntegerAttribute(java.lang.String name,
                            java.math.BigInteger value)
Adds an attribute of type big integer to the current XML tag.

Parameters:
name - The name of the attribute
value - The value of the attribute

addCharacterData

void addCharacterData(java.lang.String data)
Adds character data for the current XML tag.

Parameters:
data - The character data to add for the current tag

endTag

void endTag(java.lang.String tag)
Ends the XML tag.

Parameters:
tag - The name of the XML tag to close

marshal

void marshal(java.lang.String tagName,
             IXMLMarshallable child)
Marshals a node into this writer.

The sequence is:

  1. Writing the start XML tag
  2. Writing the attributes IXMLMarshallable.marshalAttributes(XMLOutputter)
  3. Calling recursively IXMLMarshallable.marshalChildren(XMLOutputter)
  4. Writing the end XML tag

Note

This method is taking care of handling a null child.

Parameters:
tagName - The name of child XML tag
child - The child itself, that must be marshalled

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)