Root Nodes
In BizTalk Editor, child nodes of the Schema node are known as Root nodes. Root nodes are a special type of Record node, and have a few more properties than regular Record nodes. The Root node represents the type of document described by the schema, and can be renamed as appropriate. For example, you can rename the Root node so that it describes the type of message that the schema represents, such as purchaseOrder, orderAcknowledgment, or shipNotice.
When you create a new XML schema in BizTalk Editor, the Schema node and one Root node are created automatically. You can create additional Root nodes as children of the Schema node; this enables you to create a library of schemas within a single XML Schema definition (XSD) language representation. For example, you can create a library of schemas to describe the various schemas of messages related to sending purchase orders, naming the various root nodes purchaseOrder, orderAcknowledgment, and shipNotice.
XSD representation
The following example shows the lines in the XSD representation of the schema that correspond to the Root node in the tree view of the schema.
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://BizTalk_Server_Project1.Schema2"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BizTalk_Server_Project1.Schema2"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType />
</xs:element>
</xs:schema>
Root nodes in BizTalk Editor represent the main element in a corresponding XML instance of the message in question. For example, if the Root node of a particular schema is renamed to purchaseOrder, the corresponding XSD representation has the following high-level structure.
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://BizTalk_Server_Project1.Schema2"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BizTalk_Server_Project1.Schema2"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="">
<xs:complexType>
...
</xs:complexType>
</xs:element>
</xs:schema>
A corresponding XML instance message must have the following basic structure.
<?xml version="1.0"?>
<purchaseOrder ...>
...
</purchaseOrder>
Note
Root nodes may not have Field attributes. Field attributes attached to the Root node are not saved with the schema.
See Also
- BizTalk Representation of Schemas
- Node Properties
- Record Node Properties in the UI guidance and developers API namespace reference
- How to Set Node Properties