XML

Records and Fields

The BizTalk Editor uses records and fields to present a document structure. Records and fields represent two types of components found in electronic data interchange (EDI) documents: segments and elements. A field corresponds to an EDI element and a record corresponds to an EDI segment. In regards to XML, we can think of a field as an element that either contains text or has no content at all, and a record as an element that can contain text, content, or other elements. As you can see in Figure 16-2, the root node was a record that contained four fields. The BizTalk Editor interprets the data contained in the records and fields of a document specification and creates a specification that is an XML representation of the document.

In Figure 16-2, you can also see that the BizTalk Editor has five tabs: Declaration, Reference, Parse, Dictionary, and Code List. Let's examine these tabs in more detail.

The Declaration Tab

The Declaration tab can be used to set declaration property values, add a custom declaration, and delete a custom declaration.The properties listed in the Declaration tab are shown in the following table:

Declaration Tab Properties

Property Description
Name Name of the element.
Description Description of the element. This property can be used as a comment.
Data Type Data type of the element.
Model Can be closed or open. If the model is closed, the structure of a document that uses the specification currently being defined in the BizTalk Editor must conform to this specification. If the model is open, a document that uses this specification does not have to conform to this specification.
Type Determines whether this component is an attribute or an element. For the root node, it can only be an element.
Content Defines the type of content for an element. The root node and any record with child elements are Element Only, which means they can contain only elements. All other records can be either Empty or Text Only. If an element is empty, it contains no content.
MinLength, MaxLength Used for fields or records that contain string content. These properties define the length of the field.