XMLport Designer contains four column fields: Node Name, Node Type, Source Type, and Data Source.

XMLport Designer Window

The type of information that you enter in XMLport Designer column fields is shown in the following table.

Field name Description

Node Name

In the Node Name field, you enter the XML node name of the XML element or attribute. You must enter node names in the order in which they appear in the XML document. Parent elements must precede their child elements. You indent the node names of child elements under their parent elements using one indentation per level. You list attributes under the elements that they define and you indent them to the child level.

Node Type

You use this field to specify whether the name in the Node Name field represents data of the type element or attribute. The drop-down list in a Node Type field contains two options: Element and Attribute. The default setting is Element.

Source Type

You use this field to specify the data structure that the node name corresponds to in the Microsoft Dynamics NAV database. The Source Type field contains a drop-down list containing three options: Text, Table, and Field. The default setting is Text.

  • Text

    Select this is the option when the XML data cannot be mapped directly to the database or when the database does not need the information. The value of the Text field will be put into a text variable with the name you have specified in the VariableName property (otherwise the node name will be used by default). The text variable acts like a normal global C/AL text variable. You can also turn the text source type into a big text variable by setting the TextType property to BigText.

  • Table

    Select this option to indicate that the node name is equivalent to a table or that a table record must be initialized. As with the Text option, you can specify a variable name for the table, which also acts like a global record variable. By default, the variable name is the name of the table.

  • Field

    Select this option to indicate that the node name is equivalent to a field in the database. However, for this selection to be valid, you must first have declared a table as the parent of the field. Failure to do so will cause an error to occur when you try to compile the XMLport object.

Data Source

A Data Source field has the following interactions with the Source Type field:

  • If Source Type is set to Table and you have defined a variable name for the table to be used, the format of the value shown in the DataSource field will be tablevariablename(tablename). If you have not defined a variable name, the format of the value will be shown as <tablename>(tablename).

  • If Source Type is set to Field select a field from one of the tables you have specified in the XMLport. The format of the value is shown as tablevariablename::fieldname.

XMLport Properties, Functions, and Triggers

There are a set of properties, functions, and triggers that you can use to manipulate an XMLport. There are properties, functions, and triggers for the object level, and for the element level, which consists of Field, Table, and Text. The properties that are available at the element level depend on the selections you make in the Node Type and Source Type fields in XMLport Designer. For more information, see C/SIDE Reference Guide.

See Also