Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ElevenSGML Functions (continued)

HTMLGetObjects Function

Overview

The HTMLGetObjects scans an HTML file and returns a table of references objects such as images, scripts, other HTML files.

Syntax/Parameters

Syntax

string[][] = HTMLGetObjects ( handle hObject | string url );

Parameters

hObject

A handle to an HTML Context, SGML, Mapped Text or Edit Object. Or,

url

A string specifying an HTML file.

Return Value

A string table containing a row entry for every reference within the file or an empty array on failure. Use the GetLastError function to retrieve a formatted error code. Scanning a file with no references will result in an ERROR_EOD formatted error code.

Remarks

The function will scan the HTML content for any source other than an HTML Context Object. If a context objects is provided, the current table contexts are returned.

A table with the following column keys are returned:

  Key Name   Description  
  URL   The URL as is appears in the source code.  
  QualifiedURL   A qualified version of the URL based on the path of the source file. If the source file is untitled or the URL is already qualified, this value will be the same as the URL.  
  x   Decimal zero-based x position of the start of the referencing tag.  
  y   Decimal zero-based y position of the start of the referencing tag.  
  ElementToken   Hexadecimal version of the element token.  
  Element   String version of the element, as translated by the DTD.  
  AttributeToken   Hexadecimal version of the attribute token.  
  Attribute   String version of the attribute, as translated by the DTD.  
  c_flags   Hexadecimal version of the caller flags.  

 

Note that the element and attribute text case is dependent on the select DTD. For example, HTML 5 and XHTML have lower case values.

The returned list contains all references from any tag. It is up to the caller to sort through the references to determine which are relevant to the caller’s purpose.

Related Functions

Platform Support

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

Legato IDE, Legato Basic