docs

Home Templates Classes

QBXMLTools

This utility class provides helper functions for encoding, formatting, clipboard access, and displaying XML request and response data in a readable viewer. It also maintains the entity tables used during XML escaping and decoding.


Purpose

Offers convenience methods for working with QBXML data, including date and time formatting, XML escaping and unescaping, viewer formatting, and clipboard export.


Properties

Property Type Summary
DebugObject &QBDebugLogger Shared debug logger object.
QBSessionManagerObject &QBSessionManager Reference to the active session manager.
QBXMLWriterObject &QBXMLWriter Reference to the writer instance.
XMLEntityTable QUEUE Dynamic table of XML entity encodings.
XMLViewQueue QUEUE Internal queue used to build formatted viewer output.
EnableXMLEncoding BYTE Enables XML encoding when set.
EnableExtendedEncoding BYTE Enables extended entity mappings.
EnableXMLDecoding BYTE Enables XML decoding on output.
PreloadDefaultXMLEntities BYTE Loads default entities automatically when set.
DefaultXMLEntitiesLoaded BYTE Tracks whether default entities are loaded.

Key Methods

Method Prototype (summary) Description
EncodeXML EncodeXML(Source) Converts special characters to XML safe equivalents.
DecodeXML DecodeXML(Source) Converts escaped XML back to raw characters.
AddEncodedCharPair AddEncodedCharPair(OriginalString, EncodedString) Adds a custom escape mapping to the entity table.
LoadDefaultXMLEntities LoadDefaultXMLEntities() Loads common XML entity mappings.
FormatXMLBuffer FormatXMLBuffer(RawXML) Reformats XML with indentation and line breaks.
ParseQBXMLToQueue ParseQBXMLToQueue(RawXML) Parses and stores formatted blocks for the viewer.
BuildFormattedXMLFromQueue BuildFormattedXMLFromQueue() Builds a single formatted string from viewer queue data.
ShowXMLViewer ShowXMLViewer() Opens a two tab viewer for request and response XML.
CopyRequestToClipboard CopyRequestToClipboard() Copies the current request buffer to the clipboard.
CopyResponseToClipboard CopyResponseToClipboard() Copies the current response buffer to the clipboard.
BuildXMLDateTimeFromClarion BuildXMLDateTimeFromClarion(Date, Time, DateOnly) Creates an ISO style timestamp from Clarion values.
IsValidXMLDateTime IsValidXMLDateTime(XMLDateTime) Validates that a timestamp string matches the expected format.
SplitTimeForDate SplitTimeForDate(TimeStringToSplit) Extracts a DATE from a full date time string.
SplitTimeForTime SplitTimeForTime(TimeStringToSplit) Extracts a TIME from a full date time string.
SplitTimeForUTCOffset SplitTimeForUTCOffset(TimeStringToSplit) Returns the UTC offset from a timestamp string.

Notes and Behavior



Home Templates Classes