4D v14.3

SAX OPEN XML ELEMENT ARRAYS

Home

 
4D v14.3
SAX OPEN XML ELEMENT ARRAYS

SAX OPEN XML ELEMENT ARRAYS 


 

SAX OPEN XML ELEMENT ARRAYS ( document ; tag {; attribNamesArray ; attribValuesArray} {; attribNamesArray2 ; attribValuesArray2 ; ... ; attribNamesArrayN ; attribValuesArrayN} ) 
Parameter Type   Description
document  DocRef in Reference of open document
tag  String in Name of element to open
attribNamesArray  String array in Array of attribute names
attribValuesArray  String array, Longint array, Date array, Real array, Picture array, Boolean array in Array of attribute values

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.

SAX OPEN XML ELEMENT ARRAYS accepts arrays of the date, number, Boolean and picture type as attribValuesArray parameter(s). 4D automatically carries out the necessary conversions; you can configure these conversions using the XML SET OPTIONS command.

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">

 
PROPERTIES 

Product: 4D
Theme: XML SAX
Number: 921

 
HISTORY 

Created: 4D 2004
Modified: 4D v12

 
SEE ALSO 

SAX CLOSE XML ELEMENT
SAX OPEN XML ELEMENT
XML SET OPTIONS

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : SAX OPEN XML ELEMENT ARRAYS ( 4D v11 SQL Release 6)