ILOG JRules User Guide > Integrating Application Data > Tasks > Using the XML Binding API > Assigning the Root Element Name of an XML Object

The XOM is composed of types, and an XML object is characterized by its type. If your configuration has several XML root elements defined in a schema, and these elements are related to the same type, you need to add an element name to the XML object so that the rule engine knows which root element to use. If you do not do this, you will have parsing problems.

To specify which root element you want to reference:

IlrXmlObject xmlObject = ...;
xmlObject.setAsRootelement( "myElement" );

Related Concepts

XML Binding

Related Tasks

Adding XML Objects to the Working Memory
Using XML Objects as Ruleset Parameters
Reading an XML Document
Writing to an XML Document
Managing Unknown Operators on Attributes and Elements
Configuring XML Binding