Difference between revisions of "XMLNEXT()"

From Lianjapedia
Jump to: navigation, search
Line 11: Line 11:
 
The XMLNEXT() function will read the next record contained in the XML file specified with the XMLFIRST() function, returning the number of fields in the record.  The XMLFIRST() function must be called first before the XMLNEXT() function can be used.
 
The XMLNEXT() function will read the next record contained in the XML file specified with the XMLFIRST() function, returning the number of fields in the record.  The XMLFIRST() function must be called first before the XMLNEXT() function can be used.
  
{| class="wikitable" width=100%
+
{| class="wikitable" width="100%"
!width=15%|Parameters||width=10%|Required||width=10%|Default||with=5%|Description
+
!width="15%"|Parameters||width="10%"|Required||width="10%"|Default||with="5%"|Description
 
|-
 
|-
|valign=top|<memvar1>||valign=top|Yes||valign=top|None||The name of a memory variable that will return the transaction type for the record.  Valid types are INSERT, UPDATE and DELETE.
+
|valign="top"|<memvar1>||valign="top"|Yes||valign="top"|None||The name of a memory variable that will return the transaction type for the record.  Valid types are INSERT, UPDATE and DELETE.
 
|-
 
|-
|valign=top|<memvar2>||valign=top|Yes||valign=top|None||The name of a memory variable that will return the where condition for the transaction if it is an UPDATE or DELETE type.
+
|valign="top"|<memvar2>||valign="top"|Yes||valign="top"|None||The name of a memory variable that will return the where condition for the transaction if it is an UPDATE or DELETE type.
 
|-
 
|-
|valign=top|<array1>||valign=top|Yes||valign=top|None||The name of an array that will be created that contains all the field names for the record.
+
|valign="top"|<array1>||valign="top"|Yes||valign="top"|None||The name of an array that will be created that contains all the field names for the record.
 
|-
 
|-
|valign=top|<array2>||valign=top|Yes||valign=top|None||The name of an array that will be created that contains all the data each field for the record.
+
|valign="top"|<array2>||valign="top"|Yes||valign="top"|None||The name of an array that will be created that contains all the data each field for the record.
 
|-
 
|-
 
|}
 
|}

Revision as of 10:43, 4 February 2013

Purpose

Function to read the next record contained in the XML file specified with the XMLFIRST() function and return the number of fields in the record

Syntax

XMLNEXT(<memvar1>, <memvar2>, <array1>, <array2>)

See Also

COPY, FETCH, SELECT, SET XMLFORMAT, UPDATE, XML, XML_DECODE(), XML_ENCODE(), XML_GATHER(), XML_SCATTER(), XMLCOUNT(), XMLCREATEDTD(), XMLFIRST(), XMLVALIDATE()

Description

The XMLNEXT() function will read the next record contained in the XML file specified with the XMLFIRST() function, returning the number of fields in the record. The XMLFIRST() function must be called first before the XMLNEXT() function can be used.

Parameters Required Default Description
<memvar1> Yes None The name of a memory variable that will return the transaction type for the record. Valid types are INSERT, UPDATE and DELETE.
<memvar2> Yes None The name of a memory variable that will return the where condition for the transaction if it is an UPDATE or DELETE type.
<array1> Yes None The name of an array that will be created that contains all the field names for the record.
<array2> Yes None The name of an array that will be created that contains all the data each field for the record.

The XMLNEXT() function will return -1 if it fails or where there are no more records left in the XML file, as some transaction type can contain zero fields.

Example

number = xmlnext(trans, where, names, data)
? number
        30