@XMLDOC   [VDS6]

Top  Previous  Next

Syntax:

 

@XMLDOC(VALUE, <id>, <path>)

@XMLDOC(VALUES, <id>, <path>, <name1>, <name2>, …

@XMLDOC(SEEK, <id>, <path> {, FIRST|LAST|<number>})

@XMLDOC(CHANGED, <id>)

@XMLDOC(COUNT, <id>, <path>)

@XMLDOC(FIRST, <id>)

@XMLDOC(LAST, <id>)

@XMLDOC(NEXT, <id>)

@XMLDOC(PREVIOUS, <id>)

@XMLDOC(ISFIRST, <id>)

@XMLDOC(ISLAST, <id>)

 

Description:

 

This function is used when working with XML documents. The options are:

 

@XMLDOC(VALUE,...

Returns the value stored at <path>. OK is false if <path> does not exist.

@XMLDOC(VALUES,...

Returns a string containing the specified values and attributes stored at <path>, delimited using the current fieldsep character. Attribute names must be prefixed by “@” (in quotes to prevent VDS treating it as a function.) OK is false if path does not exist.

@XMLDOC(SEEK,...

Sets the current node to <path>. Where many nodes match <path> (for example, a database containing many records) the current node will be the first matching node. The parameters FIRST, LAST and <number> may be used to set the current node to the first, last or any intermediate node that matches <path>. OK is false if <path> does not exist.

@XMLDOC(CHANGED,...

Returns ‘1’ (true) or null (false) indicating whether the document contents have changed since it was loaded.

@XMLDOC(COUNT,...

Returns the number of nodes that match <path>. If <path> is null, then the function returns the number of nodes of the same type as the current node.

These functions are typically used to browse the records in an XML database.

@XMLDOC(FIRST,...

Operates on the current node. Changes the selection to the first node of this type. OK is false if the current node is the first one.

@XMLDOC(LAST,...

Operates on the current node. Changes the selection to the last node of this type. OK is false if the current node is the last one.

@XMLDOC(NEXT,...

Operates on the current node. Changes the selection to the next node of this type. OK is false if the current node is the last one.

@XMLDOC(PREVIOUS,...

Operates on the current node. Changes the selection to the previous node of this type. OK is false if the current node is the first one.

@XMLDOC(ISFIRST,...

Operates on the current node. Returns true if the current node is the first of its type.

@XMLDOC(ISLAST,...

Operates on the current node.  Returns true if the current node is the last of its type.

 

OK:

 

As documented above.

 

Example:

 

See an example...

 

See also: