Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6d

Application v 6.1b

  

 

Chapter FiveGeneral Functions (continued)

XMLParseGetAttributes Function

Overview

The XMLParseGetAttributes function returns any attributes associated with the last parsed item as a list or table.

Syntax/Parameters

Syntax

string[]   = XMLParseGetAttributes ( handle hXPO, [boolean table_mode] );

string[][] = XMLParseGetAttributes ( handle hXPO, [boolean table_mode] );

Parameters

hXPO

handle specifying an XML Parse Object.

table_mode

An optional boolean value which specifies whether to return the data in table form. The default value is FALSE.

Return Value

Returns a string array or table containing any attributes associated with the last parsed item or an empty array on failure. Use the GetLastError function to retrieve error information. The GetLastErrorMessage can contain information on ERROR_CONTEXT.

Remarks

Assuming that the last parse was not performed in raw mode and the tag parsed had attributes, the attributes can be retrieved as a keyed list or a table. The table made is preferable if the attribute names may violate the key name restrictions within Legato.

In list mode, each item is named by the attribute name. However, this means the incoming attributes must conform to the variable key name restrictions within Legato.

In table mode, two columns are returned named “name” and “value” or position 0 and 1, respectively.

If the last parsed element did not have any attributes, the function will return an empty set with the error ERROR_EOD.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Page revised 2025-08-15