|
GoFiler Legato Script Reference
Legato v 1.5b
Application v 5.24b
|
Chapter Eleven — SGML Functions (continued)
11.3.5 SGML Parsing
Functions
The primary initiator to parse are the SGMLNextItem and
SGMLNextElement functions. If a script is looking to just walk through
elements to collect for find tag data, the SGMLNextElement is the best
choice. The parser can also scan forward [and backward] for tags.
If the element is too large (4K) or comment (64K), the parser will complete the parse and set an
error. This gives the script an opportunity to correct the issue or limitation.
On error, the parser will attempt to recover
at the most appropriate spot. A common example is a missing close quote which forces the parser to gobble up other tags.
[cover element and attribute errors]
Elements:
SGMLFindClosingElement — Scans to find closing element and gathers code or text while parsing.
SGMLFindElement — Finds a specific element with optional starting position.
SGMLIsEmptyElement — Tests parsed element as an empty element (no content expected).
Errors and Normalization:
SGMLErrorsToLog — Transfers parsing errors to log.
SGMLNormalizeErrors — Removes attributes and properties containing errors.
SGMLNormalizeToCSS — Promotes HTML attributes to CSS as appropriate.
SGMLScrubParameters — Removes specific attributes or parameters.
Parsing Functions:
SGMLGetElementString — Returns the current element as a string value.
SGMLGetElementToken — Returns the current element as a token value.
SGMLGetNamespaceString — Returns the current element namespace as a string value.
SGMLGetNamespaceToken — Returns the current element namespace as a token value.
SGMLNextElement — Gets the next element (skips spaces, text, entities) at the current or specified parse position.
SGMLNextItem — Gets the next item at the current or specified parse position.
SGMLPreviousElement — Gets the previous element (skips spaces, text, entities) at the current or specified parse position.
SGMLSetDataRange — Sets (restricts) the data range. Default end position is end of file (object).
SGMLSetPosition — Sets the parse position in terms of X/Y.
Item Properties:
SGMLGetCharacterValue — Gets the character value for the current item.
SGMLGetItemPosEX — Gets the position for the ending X last parsed item.
SGMLGetItemPosEY — Gets the position for the ending Y last parsed item.
SGMLGetItemPosSX — Gets the position for the starting X last parsed item.
SGMLGetItemPosSY — Gets the position for the starting Y last parsed item.
SGMLGetItemResult — Gets the parse result flags.
SGMLGetItemSize — Gets the size of a parsed item.
SGMLGetItemType — Gets the last parsed item type.
© 2012-2024 Novaworks, LLC. All rights reserved
worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and
11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC.
EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated
with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective
owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software
License Agreement.