GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The GetTagTextContent function gathers text until an SGML tag is encountered. It uses a Word Parse Object that must be setup for tag parsing.
Syntax/Parameters
Syntax
string = GetTagTextContent ( handle hWordParse, [dword flags] );
Parameters
hWordParse
A handle to a Word Parse Object that has been setup for parsing SGML tags.
flags
An optional dword specifying one or more flags for collecting the text. The default value is 0x00000000.
Return Value
Returns a string containing all of the text until a tag was encountered or the source string was exhausted. Use the GetLastError function to retrieve error information.
If there are character translation errors, the last error will contain the number of errors. It is up to the caller to determine the nature and position of the errors.
On overflow, ERROR_OVERFLOW, the low word will be 0x0000 for a destination buffer overflow (> 2mb) or 0x0001 for a word buffer overflow. The word buffer is, by default, 4kb, if the data contains encoded information such as base-64, use the WP_BIG_WORD_BUFFER option during the creation of the Word Parse Object.
Remarks
This function is a “quick and dirty” method of retrieving content from SGML tagged information without the complexity of setting up an SGML element object or a DTD. Very little error and syntax checking is performed.
Data collection starts are the current position for the Word Parse Object and continues until the source information is exhausted or an SGML tag is encountered. The parse position is left at the start of the SGML tag. How the text is processed is controlled by the following flags:
SDK Define | Bitwise | Description | ||||
SGML_CT_RAW_SPACE | 0x00000001 | Collect all spaces, not just a word space for white space. | ||||
SGML_CT_TRANSLATE_ENTITIES | 0x00000002 | Translate Character Entities | ||||
SGML_CT_TRANSLATE_TO_UTF | 0x00000010 | Translate to UTF |
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 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.