XBinder XML Runtime
XBinder Version 3.0.x
|
The OSXMLDecodeBuffer class is derived from the OSXMLMessageBuffer base class. More...
#include <OSXMLDecodeBuffer.h>
Public Member Functions | |
OSXMLDecodeBuffer (const char *xmlFile) | |
This version of the OSXMLDecodeBuffer constructor takes a name of a file that contains XML data to be decoded and constructs a buffer. More... | |
OSXMLDecodeBuffer (const OSOCTET *msgbuf, size_t bufsiz) | |
This version of the OSXMLDecodeBuffer constructor takes parameters describing a message in memory to be decoded and constructs a buffer. More... | |
OSXMLDecodeBuffer (OSRTInputStream &inputStream) | |
This version of the OSXMLDecodeBuffer constructor takes a reference to the OSInputStream object. More... | |
EXTXMLMETHOD int | decodeXML (OSXMLReaderClass *pReader) |
This method decodes an XML message associated with this buffer. More... | |
virtual EXTXMLMETHOD int | init () |
This method initializes the decode message buffer. More... | |
EXTXMLMETHOD OSBOOL | isWellFormed () |
This method determines if an XML fragment is well-formed. More... | |
EXTXMLMETHOD int | parseElementName (OSUTF8CHAR **ppName) |
This method parses the initial tag from an XML message. More... | |
EXTXMLMETHOD int | parseElemQName (OSXMLQName *pQName) |
This method parses the initial tag from an XML message. More... | |
EXTXMLMETHOD OSUINT32 | setMaxErrors (OSUINT32 maxErrors) |
This method sets the maximum number of errors returned by the SAX parser. More... | |
virtual OSBOOL | isA (Type bufferType) |
This is a virtual method that must be overridden by derived classes to allow identification of the class. More... | |
![]() | |
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. More... | |
EXTXMLMETHOD int | getIndentChar () |
This method returns current XML output indent character value (default is space). More... | |
EXTXMLMETHOD OSBOOL | getWriteBOM () |
This function returns whether writing the Unicode BOM is currently enabled or disabled. More... | |
virtual EXTXMLMETHOD void | setNamespace (const OSUTF8CHAR *prefix, const OSUTF8CHAR *uri, OSRTDList *pNSAttrs=0) |
This method sets a namespace in the context namespace list. More... | |
virtual EXTXMLMETHOD void | setAppInfo (void *pXMLInfo) |
This method sets application specific context information within the common context structure. More... | |
EXTXMLMETHOD void | setFormatting (OSBOOL doFormatting) |
This method sets XML output formatting to the given value. More... | |
EXTXMLMETHOD void | setIndent (OSUINT8 indent) |
This method sets XML output indent to the given value. More... | |
EXTXMLMETHOD void | setIndentChar (char indentChar) |
This method sets XML output indent character to the given value. More... | |
EXTXMLMETHOD void | setWriteBOM (OSBOOL write) |
This method sets whether to write the Unicode byte order mark before the XML header. More... | |
Protected Attributes | |
OSRTInputStream * | mpInputStream |
Input source for message to be decoded. | |
OSBOOL | mbOwnStream |
This is set to true if this object creates the underlying stream object. More... | |
Additional Inherited Members | |
![]() | |
EXTXMLMETHOD | OSXMLMessageBuffer (Type bufferType, OSRTContext *pContext=0) |
The protected constructor creates a new context and sets the buffer class type. More... | |
The OSXMLDecodeBuffer class is derived from the OSXMLMessageBuffer base class.
It contains variables and methods specific to decoding XML messages. It is used to manage an input buffer or stream containing a message to be decoded.
Note that the XML decode buffer object does not take a message buffer argument because buffer management is handled by the XML parser.
Definition at line 45 of file OSXMLDecodeBuffer.h.
OSXMLDecodeBuffer::OSXMLDecodeBuffer | ( | const char * | xmlFile | ) |
This version of the OSXMLDecodeBuffer constructor takes a name of a file that contains XML data to be decoded and constructs a buffer.
xmlFile | A pointer to name of file to be decoded. |
OSXMLDecodeBuffer::OSXMLDecodeBuffer | ( | const OSOCTET * | msgbuf, |
size_t | bufsiz | ||
) |
This version of the OSXMLDecodeBuffer constructor takes parameters describing a message in memory to be decoded and constructs a buffer.
msgbuf | A pointer to a buffer containing an XML message. |
bufsiz | Size of the message buffer. |
OSXMLDecodeBuffer::OSXMLDecodeBuffer | ( | OSRTInputStream & | inputStream | ) |
This version of the OSXMLDecodeBuffer constructor takes a reference to the OSInputStream object.
The stream is assumed to have been previuously initialized to point at an encoded XML message.
inputStream | reference to the OSInputStream object |
EXTXMLMETHOD int OSXMLDecodeBuffer::decodeXML | ( | OSXMLReaderClass * | pReader | ) |
This method decodes an XML message associated with this buffer.
pReader | Pointer to OSXMLReaderClass object. |
|
virtual |
This method initializes the decode message buffer.
|
inlinevirtual |
This is a virtual method that must be overridden by derived classes to allow identification of the class.
The base class variant is abstract. This method matches an enumerated identifier defined in the base class. One identifier is declared for each of the derived classes.
bufferType | Enumerated identifier specifying a derived class. This type is defined as a public access type in the OSRTMessageBufferIF base interface. Possible values include BEREncode, BERDecode, PEREncode, PERDecode, XMLEncode, and XMLDecode. |
bufferType
argument is XMLDecode
. argument. Definition at line 169 of file OSXMLDecodeBuffer.h.
EXTXMLMETHOD OSBOOL OSXMLDecodeBuffer::isWellFormed | ( | ) |
This method determines if an XML fragment is well-formed.
The stream is reset to the start position following the test.
EXTXMLMETHOD int OSXMLDecodeBuffer::parseElementName | ( | OSUTF8CHAR ** | ppName | ) |
This method parses the initial tag from an XML message.
If the tag is a QName, only the local part of the name is returned.
ppName | Pointer to a pointer to receive decoded UTF-8 string. Dynamic memory is allocated for the variable using the rtxMemAlloc function. |
EXTXMLMETHOD int OSXMLDecodeBuffer::parseElemQName | ( | OSXMLQName * | pQName | ) |
This method parses the initial tag from an XML message.
pQName | Pointer to a QName structure to receive parsed name prefix and local name. Dynamic memory is allocated for both name parts using the rtxMemAlloc function. |
EXTXMLMETHOD OSUINT32 OSXMLDecodeBuffer::setMaxErrors | ( | OSUINT32 | maxErrors | ) |
This method sets the maximum number of errors returned by the SAX parser.
maxErrors | The desired number of maximum errors. |
|
protected |
This is set to true if this object creates the underlying stream object.
In this case, the stream will be deleted in the object's destructor.
Definition at line 57 of file OSXMLDecodeBuffer.h.