SAX OPEN XML ELEMENT ARRAYS

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


SAX OPEN XML ELEMENT ARRAYS (document; tag{; attribNamesArray; attribValuesArray}{; attribNamesArray2; attribValuesArray2; ...; attribNamesArrayN; attribValuesArrayN})

ParameterTypeDescription
documentDocRefReference of open document
tagStringName of element to open
attribNamesArrayArray stringArray of attribute names
attribValuesArrayArray stringArray of attribute values

Description

The SAX OPEN XML ELEMENT ARRAYS command is used to add a new element in the XML document whose reference is passed in document as well as, optionally, attributes and their values in the form of arrays.

Except for the support of arrays (see below), this command is identical to SAX OPEN XML ELEMENT. Please refer to the description of this command for more information about its operation.

Optionally, the SAX OPEN XML ELEMENT ARRAYS command can be used to pass pairs of attributes and attribute values in the form of arrays in the attribNamesArray and attribValuesArray parameters.

The arrays must have been created previously and operate in attribute/attribute value pairs. You can pass as many pairs of arrays, and as many items in each pair, as you want.

Example

The following method:

   ARRAY STRING(80;tAttrNames;2)
   ARRAY STRING(80;tAttrValues;2)
   vElement:="Book"
   tAttrNames{1}:="Font"
   tAttrValues{1}:="Arial"
   tAttrNames{2}:="Style"
   tAttrValues{2}:="Bold"
   SAX OPEN XML ELEMENT ARRAYS($DocRef;vElement;tAttrNames;tAttrValues)

... will write in the document:

<Book Font="Arial" Style="Bold">

See Also

SAX CLOSE XML ELEMENT, SAX OPEN XML ELEMENT.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next