Create a Parse XML rule to map data from an XML text message into clipboard property values. Parse XML rules are used with services and connectors.
A Parse XML rule has three key parts: a class, a name, and a root element.
Although the first key part of this rule is known as the Namespace, it does not conform to any official XML namespace, but serves a similar function, to partition the set of possible parsing rules to avoid accidental name collisions.
- In the header of Dev Studio, click .
- On the Create page, in the Label field,
enter a name to group logically related XML documents.This value is arbitrary and is used only to differentiate identical element names that are used in different contexts. (You can include special characters such as @, % & * in this key part.)
Although conceptually similar to a XML namespace, the Namespace key part is not used for matching namespace-qualified element names as defined by a Document Type Description (DTD) or XML Schema (XSDL) definition.
If this Parse XML rule was created by the Import XSD/DTD wizard from a XML Schema Definition (XSD) file, the namespace in the XSD is used. If the XSD file does not identify a namespace, the value
pyDefaultis used. This value has no special significance or function.
- In the Root Element Name field, enter the name of the root
element of the XML documents to be parsed by this rule.This value must be a valid Java identifier.
- In the Context section, in the Apply to
field, select a class for this rule.The class is typically derived from the Data- base class or Work- base class.
The list of available class names depends on the ruleset that you select. Each class can restrict applying rules to an explicit set of rulesets as specified on the Advanced tab of the class form.
- Click Create and open