[TOC] [Prev] [Next] [Bottom]



<@ELEMENTATTRIBUTES>

Syntax

<@ELEMENTATTRIBUTES OBJECT=variable [SCOPE=scope] [ELEMENT=Xpointer] [TYPE=text|array] [{array attributes}]>

Description

This tag is used to return the value of all attributes of one or more elements from a document instance. The OBJECT attribute defines the document instance variable. The SCOPE attribute defines the scope of that document instance variable.

The ELEMENT attribute contains a pointer to an element or elements within the document instance. All attributes of the element or elements pointed to by ELEMENT are returned.

There are array-returning attributes that can be used to specify prefixes and suffixes for the returned array, rows within the array, and columns within the rows. They are described in the section Array-to-Text Conversion Attributes. By default, the returned array is formatted as an HTML table.

If the TYPE attribute is set to TEXT, a returned array is not passed as an array reference when assigning to another variable, but as a text representation of the array, which is returned by default with the array-formatting attributes.

For more information on returning values from a document instance, see Chapter 9 of the User's Guide.

Example

Starting with the following document instance in a variable called myDom:

<XML><DIV>
<P ID=a111 CLASS=normal>Paragraph 1</P>
<P ID=b222 CLASS=different>Paragraph 2</P>
</DIV></XML>

<@ELEMENTATTRIBUTES OBJECT="myDom" ELEMENT="root().child(1).child(all)"> returns an array consisting of both attribute values:


a111


normal


b222


different

Row 0 (zero) of the array contains the attribute name for each column.

See Also

Array-to-Text Conversion Attributes
<@DOM>
<@DOMDELETE>
<@DOMINSERT>
<@DOMREPLACE>
<@ELEMENTATTRIBUTE>
<@ELEMENTNAME>
<@ELEMENTVALUE>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1999, Pervasive Software. All rights reserved.