OSXMLMessageBuffer Class Reference
The XML message buffer class is derived from the OSMessageBuffer base class. More...
#include <OSXMLMessageBuffer.h>
Public Member Functions | |
virtual EXTXMLMETHOD void * | getAppInfo () |
The getAppInfo method returns the pointer to application context information. | |
EXTXMLMETHOD int | getIndent () |
This method returns current XML output indent value. | |
EXTXMLMETHOD int | getIndentChar () |
This method returns current XML output indent character value (default is space). | |
EXTXMLMETHOD OSBOOL | getWriteBOM () |
This function returns whether writing the Unicode BOM is currently enabled or disabled. | |
virtual EXTXMLMETHOD void | setNamespace (const OSUTF8CHAR *prefix, const OSUTF8CHAR *uri, OSRTDList *pNSAttrs=0) |
This method sets a namespace in the context namespace list. | |
virtual EXTXMLMETHOD void | setAppInfo (void *pXMLInfo) |
This method sets application specific context information within the common context structure. | |
EXTXMLMETHOD void | setFormatting (OSBOOL doFormatting) |
This method sets XML output formatting to the given value. | |
EXTXMLMETHOD void | setIndent (OSUINT8 indent) |
This method sets XML output indent to the given value. | |
EXTXMLMETHOD void | setIndentChar (char indentChar) |
This method sets XML output indent character to the given value. | |
EXTXMLMETHOD void | setWriteBOM (OSBOOL write) |
This method sets whether to write the Unicode byte order mark before the XML header. | |
Protected Member Functions | |
EXTXMLMETHOD | OSXMLMessageBuffer (Type bufferType, OSRTContext *pContext=0) |
The protected constructor creates a new context and sets the buffer class type. |
Detailed Description
The XML message buffer class is derived from the OSMessageBuffer base class.
It is the base class for the OSXMLEncodeBuffer and OSXMLDecodeBuffer classes. It contains variables and methods specific to encoding or decoding XML messages. It is used to manage the buffer into which a message is to be encoded or decoded.
Definition at line 42 of file OSXMLMessageBuffer.h.
Constructor & Destructor Documentation
EXTXMLMETHOD OSXMLMessageBuffer::OSXMLMessageBuffer | ( | Type | bufferType, | |
OSRTContext * | pContext = 0 | |||
) | [protected] |
The protected constructor creates a new context and sets the buffer class type.
- Parameters:
-
bufferType Type of message buffer that is being created (for example, XMLEncode or XMLDecode). pContext Pointer to a context to use. If NULL, new context will be allocated.
Member Function Documentation
EXTXMLMETHOD int OSXMLMessageBuffer::getIndent | ( | ) |
This method returns current XML output indent value.
- Returns:
- Current indent value (>= 0) if OK, negative status code if error.
EXTXMLMETHOD int OSXMLMessageBuffer::getIndentChar | ( | ) |
This method returns current XML output indent character value (default is space).
- Returns:
- Current indent character (> 0) if OK, negative status code if error.
EXTXMLMETHOD OSBOOL OSXMLMessageBuffer::getWriteBOM | ( | ) |
This function returns whether writing the Unicode BOM is currently enabled or disabled.
- Returns:
- TRUE if writing BOM is enabled, FALSE otherwise.
virtual EXTXMLMETHOD void OSXMLMessageBuffer::setAppInfo | ( | void * | pXMLInfo | ) | [virtual] |
This method sets application specific context information within the common context structure.
For XML encoding/decoding, this is a structure of type OSXMLCtxtInfo.
- Parameters:
-
pXMLInfo Pointer to context information.
EXTXMLMETHOD void OSXMLMessageBuffer::setFormatting | ( | OSBOOL | doFormatting | ) |
This method sets XML output formatting to the given value.
If TRUE (the default), the XML document is formatted with indentation and newlines. If FALSE, all whitespace between elements is suppressed. Turning formatting off can provide more compressed documents and also a more canonical representation which is important for security applications.
- Parameters:
-
doFormatting Boolean value indicating if formatting is to be done
- Returns:
- Status of operation: 0 if OK, negative status code if error.
EXTXMLMETHOD void OSXMLMessageBuffer::setIndent | ( | OSUINT8 | indent | ) |
This method sets XML output indent to the given value.
- Parameters:
-
indent Number of spaces per indent. Default is 3.
EXTXMLMETHOD void OSXMLMessageBuffer::setIndentChar | ( | char | indentChar | ) |
This method sets XML output indent character to the given value.
- Parameters:
-
indentChar Indent character. Default is space.
virtual EXTXMLMETHOD void OSXMLMessageBuffer::setNamespace | ( | const OSUTF8CHAR * | prefix, | |
const OSUTF8CHAR * | uri, | |||
OSRTDList * | pNSAttrs = 0 | |||
) | [virtual] |
This method sets a namespace in the context namespace list.
If the given namespace URI does not exist in the list, the namespace is added. If the URI is found, the value of the namespace prefix will be changed to the given prefix.
- Parameters:
-
prefix Namespace prefix uri Namespace URI pNSAttrs Namespace list to which namespace is to be added
EXTXMLMETHOD void OSXMLMessageBuffer::setWriteBOM | ( | OSBOOL | write | ) |
This method sets whether to write the Unicode byte order mark before the XML header.
- Parameters:
-
write TRUE if BOM should be written, FALSE otherwise.
The documentation for this class was generated from the following file: