XML Reference: Siebel Enterprise Application Integration > Siebel XML Converters >

XML Hierarchy Converter


The XML Hierarchy Converter does not use integration object metadata, but instead relies on simple rules for converting between an XML hierarchy and an XML document. The important distinction between this service and the XML Converter is a Property Set of type XMLHierarchy, which is always presented as a child of Service Method Arguments and as a parent of the XML document root element.

As shown in Figure 5, every XML element becomes a property set where the XML tag name becomes the Type. For example, the XML element Contact becomes a property set of the type Contact in Siebel application. In addition, every XML attribute becomes a property within the element's property set. For example, if the attribute of the XML element "Contact" is City = "Toronto", then "City=Toronto" will be a property for Contact.

Figure 5. XML Hierarchy Representation of XML Document Structure

The convenience of having this representation is that the XML Hierarchy Converter can convert to and from this representation in the same way, independent of whether or not the XML document includes a Siebel Message or an external XML document. This representation is also handled in Siebel Workflow because it allows all the XML documents in memory to be treated as the Hierarchical Service Parameter of type XMLHierarchy.

XML Hierarchy Representation in Siebel Business Applications

  • As illustrated in Figure 5, there is a Property Set of type XMLHierarchy that always appears as a child of the Service Method Argument and the parent of the root XML element.
  • Elements are represented by Property Sets. The XML tag is the type in the property set and the value assigned to that XML tag is the Value in the property set. For example, if an XML element has a value such as <Contact City="Toronto">Davis, Pace</Contact> as shown in Figure 5, then the Value in the property set would be set to Davis, Pace and the Type in the property set would be set to contact.
  • Attributes are represented as properties on the Property Set that represent the attribute's element.
  • Child elements are represented as child property sets and Parent elements as Parent property sets.
  • Processing instructions are represented as a child Property Set of type ProcessingInstructions, which is at the same level as the root element (the child of XML Hierarchy). In Figure 5, the root element is Account.

The following topics are also described:

XML Hierarchy Converter Business Service Methods

There are two methods for the XML Hierarchy Converter, as shown in Table 21. The arguments for each method appear in Table 22, Table 23, Table 24, and Table 25.

Table 21. XML Hierarchy Converter Methods
Display Name
Name
Description

XML Document to XML Hierarchy

XMLDocToXMLHier

Converts an XML document into an XML Hierarchy.

XML Hierarchy to XML Document

XMLHierToXMLDoc

Converts an XML Hierarchy into an XML document.

XML Document to XML Hierarchy Method Arguments

Table 22 describes the input arguments for the XML Document to XML Hierarchy method of the XML Hierarchy Converter.

Table 22. XML Document to XML Hierarchy Method Input Arguments
Display Name
Name
Data Type
Description

XML Document

<Value>

String

The input XML Document.

If XML converter business services that expect XML Document (EAI XML Converter, XML Converter, XML Hierarchy Converter) are being used, then <Value> should contain a binary buffer rather than a text string.

With workflows, use the Binary data type for the process property for XML Document.

Escape Names

EscapeNames

String

Invalid characters in XML tags will be escaped, using Siebel's internal escape format.

If True, then process Escape characters (this is the default).

If False, then do not process Escape characters.

Validate External Entity

ValidateExternalEntity

String

If True, then the parser will be set to validate against external metadata, such as DTD schemas.

External Entity Directory

ExternalEntityDirectory

String

Location of external entity files, such as DTD files.

Ignore Character Set Conversion Errors

IgnoreCharSetConvErrors

String

Default is False. If the Siebel application cannot represent a given character set, such as the local code page character set, then conversion errors are logged, including a warning log entry. When set to True, only a warning message is logged.

Table 23 describes the output arguments for the XML Document to XML Hierarchy method of the XML Hierarchy Converter.

Table 23. XML Document to XML Hierarchy Method Output Arguments
Display Name
Name
Data Type
Description

XML Character Encoding

XMLCharEncoding

String

Character encoding of the XML document, detected by the converter, independent of the parser.

XML Hierarchy

XMLHierarchy

Hierarchy

The Output XML hierarchy.

XML Hierarchy to XML Document Method Arguments

Table 24 describes the input arguments for the XML Hierarchy to XML Document method of the XML Hierarchy Converter.

Table 24. XML Hierarchy to XML Document Method Input Arguments
Display Name
Name
Data Type
Description

Escape Names

EscapeNames

String

Invalid characters in XML tags will be escaped, using Siebel's internal escape format.

  • If True, then Escape invalid characters (this is the default).
  • If False, then delete invalid characters. (Do not use in XML tags.)

XML Character Encoding

XMLCharEncoding

String

Outputs the XML character encoding to use. If encoding is blank or not supported, then an error is produced.

XML Header Text

XMLHeaderText

String

A string in a local code page character encoding to be inserted before the XML document's root element, after the <?xml...?> declaration. This allows custom processing instructions or an XML header to be inserted before the XML document data starts.

For instance, if the header text is <myheader>data</myheader> and the XML document output without this parameter is <?xml version="1.0" encoding="UTF-8"?><account>..</account>, then the document with the XMLHeaderText included will be:

<?xml version="1.0" encoding="UTF-8"?><myheader>some data</myheader><account>.......</account>

XML Hierarchy

XMLHierarchy

Hierarchy

The XML hierarchy.

Ignore Character Set Conversion Errors

IgnoreCharSetConvErrors

String

Default is False. If the Siebel application cannot represent a given character set, such as the local code page character set, then conversion errors are logged, including a warning log entry. When set to True, only a warning message is logged.

Tags on Separate Lines

Tags on Separate Lines

String

Default is True, which means that a line feed is placed at the end of each tag. If False, then no line feed is added to the end of each tag; the XML message is generated in a single line.

Generate Processing Instructions

GenerateProcessingInstructions

String

Default is True. If set to False, then the Siebel processing instructions are not written.

Table 25 describes the output argument for the XML Hierarchy to XML Document method of the XML Hierarchy Converter.

Table 25. XML Hierarchy to XML Document Method Output Argument
Display Name
Name
Data Type
Description

XML Document

<Value>

String

The output XML Document.

XML Reference: Siebel Enterprise Application Integration Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.