> Expat4D Home > Documentation > Command Reference

xml_SetTextToOutputBuffer ( parserID; text )


  • --> parserID : longint
  • --> text : text

This commands puts the text you pass onto the outputBuffer for parserID. The text is always appended to the end of the output buffer and can then be received using xml_GetOutputBuffer.

By default, the output buffer grows in 32K blocks, so if you add 16k of text into the output buffer, the total size in RAM will still be 32k, although the value returned by xml_GetOutputBufferSize will still be 16k. If you add a further 24k of text to the output buffer, the total size of the output buffer will be 64k, even though the value returned by xml_GetOutputBufferSize will be only 40k. This is done to prevent having to move the output buffer around in RAM to much through constant resizing, especially when you're only appending small amounts, but many times.

If the settings of the output buffer are not optimum for a particular application, you can modify the increment size and initial size of the output buffer on a per parser basis. See xml_SetParserOption for details.

If you set the increment size to a size smaller than the text you are passing in this routine, the OutputBuffer will still correctly resize to accommodate the text you are passing.

If for any reason the text cannot be appended to the output buffer, an Expat4D error is generated.

See Also: xml_SetBlobToOutputBuffer

  Expat4D Logo

Developer Documentation

Creating Parsers, Destroying Parsers, Parsing Text

Configuring Handler Methods

Position and Error Reporting Functions

Miscellaneous Functions

Output Buffer Functions

Error Codes


> Expat4D Home > Documentation > Command Reference

Last Modified: 27th April 2001 at 9:00 PM