Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6d

Application v 6.1b

  

 

Chapter FiveGeneral Functions (continued)

XMLParseLoadContent Function

Overview

The XMLParseLoadContent function grabs the content of a tag or tagged area.

Syntax/Parameters

Syntax

string = XMLParseLoadContent ( handle hXPO, [int mode] );

Parameters

hXPO

handle specifying an XML Parse Object.

mode

An optional int value specifying the mode the load the data. The default value is XP_LOAD_CONTENT.

Return Value

Returns a string containing the data within an area an empty string on failure. Use the GetLastError function to retrieve error information. The string can be empty without an error.

Remarks

The XMLParseLoadContent function loads all the content between tags. It operates in four modes:

XP_LOAD_CONTENT

In this mode (the default), the opening tag is converted to closing tag and the function loads data until the closing tag is encounter. The function does not count nested tags. Character entities are converted to UTF-8 characters.

XP_LOAD_CONTENT_TO_TAG

In this mode the function loads data until a tag is encountered. Character entities are converted to UTF-8 characters.

XP_LOAD_CONTENT_HTML

In this mode, the opening tag is converted to closing tag and the function loads data until the closing tag is encounter. The function does not count nested tags. Character entities are passed through.

XP_LOAD_CONTENT_CDATA

In this mode, data is copied verbatim until the CDATA closing “]]>” sequence of characters is encountered. The sequence “<![CDATA[” must be in the last item parsed. It is important to note that while the open CDATA will be treated as a tag, the element and concept values will be returned as empty.

All white space is copied “as is”. As such, the types of line endings cannot be relied upon. For example, if reading from a Mapped Text or Edit Object, each line ends with CR (0x0D) while a raw data file or string could contain any combination of line ending characters, depending on the source.

The position will be updated to the end of the item that stopped the content load.

The internal load buffer is limited to 4MB of space.

Related Functions

Platform Support

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

Page revised 2025-08-15