Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

osrtxml.h File Reference

XML low-level C encode/decode functions. More...

#include "rtxsrc/rtxCommon.h"
#include "rtxmlsrc/rtSaxDefs.h"
#include "rtxsrc/rtxDList.h"
#include "rtxsrc/rtxMemBuf.h"
#include "rtxsrc/rtxFloat.h"
#include "rtxmlsrc/rtXmlNamespace.h"

Go to the source code of this file.

Classes

struct  OSXMLFacets
struct  OSXMLCtxtInfo
struct  OSXMLQName
struct  OSIntegerFmt
struct  OSDecimalFmt
struct  OSDoubleFmt

Defines

#define EXTERNXML
#define OSXMLSOAP11URI   "http://schemas.xmlsoap.org/soap/envelope/"
#define OSXMLSOAP12URI   "http://www.w3.org/2003/05/soap-envelope"
#define OSXMLINDENT   3
#define rtXmlErrAddStrParm   rtxErrAddStrParm
#define rtXmlFinalizeMemBuf(pMemBuf)
#define rtXmlGetEncBufPtr(pctxt)   (pctxt)->buffer.data
 This macro returns the start address of the encoded XML message.
#define rtXmlGetEncBufLen(pctxt)   (pctxt)->buffer.byteIndex
 This macro returns the length of the encoded XML message.

Enumerations

enum  OSXMLEncoding
enum  OSXMLState

Functions

int rtXmlInitContext (OSCTXT *pctxt)
 This function initializes a context variable for XML encoding or decoding.
int rtXmlCreateFileInputSource (OSCTXT *pctxt, const char *filepath)
 This function creates an XML document file input source.
int rtXmlDecBase64Binary (OSMemBuf *pMemBuf, const OSUTF8CHAR *inpdata, int length)
 This function decodes the contents of a Base64-encoded binary data type into a memory buffer.
int rtXmlDecBase64Str (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT16 *pnocts, OSINT32 bufsize)
 This function decodes a contents of a Base64-encode binary string into a static memory structure.
int rtXmlDecBase64StrValue (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, size_t bufSize, size_t srcDataLen)
 This function decodes a contents of a Base64-encode binary string into the specified octet array.
int rtXmlDecBigInt (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue)
 This function will decode a variable of the XSD integer type.
int rtXmlDecBool (OSCTXT *pctxt, OSBOOL *pvalue)
 This function decodes a variable of the boolean type.
int rtXmlDecDate (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'date' type.
int rtXmlDecTime (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'time' type.
int rtXmlDecDateTime (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'dateTime' type.
int rtXmlDecDecimal (OSCTXT *pctxt, OSREAL *pvalue, int totalDigits, int fractionDigits)
 This function decodes the contents of a decimal data type.
int rtXmlDecDouble (OSCTXT *pctxt, OSREAL *pvalue, int totalDigits, int fractionDigits)
 This function decodes the contents of a float or double data type.
int rtXmlDecDynBase64Str (OSCTXT *pctxt, OSDynOctStr *pvalue)
 This function decodes a contents of a Base64-encode binary string.
int rtXmlDecDynHexStr (OSCTXT *pctxt, OSDynOctStr *pvalue)
 This function decodes a contents of a hexBinary string.
int rtXmlDecDynUTF8Str (OSCTXT *pctxt, const OSUTF8CHAR **outdata)
 This function decodes the contents of a UTF-8 string data type.
int rtXmlDecXmlStr (OSCTXT *pctxt, OSXMLSTRING *outdata)
 This function decodes the contents of an XML string data type.
int rtXmlDecHexBinary (OSMemBuf *pMemBuf, const OSUTF8CHAR *inpdata, int length)
 This function decodes the contents of a hex-encoded binary data type into a memory buffer.
int rtXmlDecHexStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT16 *pnocts, OSINT32 bufsize)
 This function decodes the contents of a hexBinary string into a static memory structure.
int rtXmlDecGYear (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gYear' type.
int rtXmlDecGYearMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gYearMonth' type.
int rtXmlDecGMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gMonth' type.
int rtXmlDecGMonthDay (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gMonthDay' type.
int rtXmlDecGDay (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gDay' type.
int rtXmlDecInt (OSCTXT *pctxt, OSINT32 *pvalue)
 This function decodes the contents of a 32-bit integer data type.
int rtXmlDecInt8 (OSCTXT *pctxt, OSINT8 *pvalue)
 This function decodes the contents of an 8-bit integer data type (i.e.
int rtXmlDecInt16 (OSCTXT *pctxt, OSINT16 *pvalue)
 This function decodes the contents of a 16-bit integer data type.
int rtXmlDecInt64 (OSCTXT *pctxt, OSINT64 *pvalue)
 This function decodes the contents of a 64-bit integer data type.
int rtXmlDecUInt (OSCTXT *pctxt, OSUINT32 *pvalue)
 This function decodes the contents of an unsigned 32-bit integer data type.
int rtXmlDecUInt8 (OSCTXT *pctxt, OSUINT8 *pvalue)
 This function decodes the contents of an unsigned 8-bit integer data type (i.e.
int rtXmlDecUInt16 (OSCTXT *pctxt, OSUINT16 *pvalue)
 This function decodes the contents of an unsigned 16-bit integer data type.
int rtXmlDecUInt64 (OSCTXT *pctxt, OSUINT64 *pvalue)
 This function decodes the contents of an unsigned 64-bit integer data type.
const OSUTF8CHARrtXmlDecQName (OSCTXT *pctxt, const OSUTF8CHAR *qname, const OSUTF8CHAR **prefix)
 This function decodes an XML qualified name string (QName) type.
int rtXmlDecXSIAttr (OSCTXT *pctxt, const OSUTF8CHAR *attrName, const OSUTF8CHAR *attrValue)
 This function decodes XML schema instance (XSI) attribute.
int rtXmlDecXSIAttrs (OSCTXT *pctxt, const OSUTF8CHAR *const *attrs, const char *typeName)
 This function decodes XML schema instance (XSI) attributes.
int rtXmlParseElementName (OSCTXT *pctxt, OSUTF8CHAR **ppName)
 This function parses the initial tag from an XML message.
int rtXmlParseElemQName (OSCTXT *pctxt, OSXMLQName *pQName)
 This function parses the initial tag from an XML message.
int rtXmlEncAny (OSCTXT *pctxt, OSXMLSTRING *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD any type.
int rtXmlEncAnyAttr (OSCTXT *pctxt, OSRTDList *pAnyAttrList)
 This function encodes a list of OSAnyAttr attributes in which the name and value are given as a UTF-8 string.
int rtXmlEncBase64Binary (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD base64Binary type.
int rtXmlEncBase64BinaryAttr (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes a variable of the XSD base64Binary type as an attribute.
int rtXmlEncBase64StrValue (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value)
 This function encodes a variable of the XSD base64Binary type.
int rtXmlEncBigInt (OSCTXT *pctxt, const OSUTF8CHAR *value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD integer type.
int rtXmlEncBigIntAttr (OSCTXT *pctxt, const OSUTF8CHAR *value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes an XSD integer attribute value.
int rtXmlEncBigIntValue (OSCTXT *pctxt, const OSUTF8CHAR *value)
 This function encodes an XSD integer attribute value.
int rtXmlEncBool (OSCTXT *pctxt, OSBOOL value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD boolean type.
int rtXmlEncBoolValue (OSCTXT *pctxt, OSBOOL value)
 This function encodes a variable of the XSD boolean type.
int rtXmlEncBoolAttr (OSCTXT *pctxt, OSBOOL value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes an XSD boolean attribute value.
int rtXmlEncDate (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD 'date' type as a string.
int rtXmlEncDateValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a variable of the XSD 'date' type as a string.
int rtXmlEncTime (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD 'time' type as an string.
int rtXmlEncTimeValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a variable of the XSD 'time' type as an string.
int rtXmlEncDateTime (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a numeric date/time value into an XML string representation.
int rtXmlEncDateTimeValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a numeric date/time value into an XML string representation.
int rtXmlEncDecimal (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix, const OSDecimalFmt *pFmtSpec)
 This function encodes a variable of the XSD decimal type.
int rtXmlEncDecimalAttr (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen, const OSDecimalFmt *pFmtSpec)
 This function encodes a variable of the XSD decimal type as an attribute.
int rtXmlEncDecimalValue (OSCTXT *pctxt, OSREAL value, const OSDecimalFmt *pFmtSpec, char *pDestBuf, size_t destBufSize)
 This function encodes a value of the XSD decimal type.
int rtXmlEncDouble (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix, const OSDoubleFmt *pFmtSpec)
 This function encodes a variable of the XSD double type.
int rtXmlEncDoubleAttr (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen, const OSDoubleFmt *pFmtSpec)
 This function encodes a variable of the XSD double type as an attribute.
int rtXmlEncDoubleValue (OSCTXT *pctxt, OSREAL value, const OSDoubleFmt *pFmtSpec, int defaultPrecision)
 This function encodes a value of the XSD double or float type.
int rtXmlEncEmptyElement (OSCTXT *pctxt, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix, OSBOOL terminate)
 This function encodes an enpty element tag value (<elemName>).
int rtXmlEncEndDocument (OSCTXT *pctxt)
 This function adds trailor information and a null terminator at the end of the XML document being encoded.
int rtXmlEncEndElement (OSCTXT *pctxt, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes an end element tag value (</elemName>).
int rtXmlEncEndSoapEnv (OSCTXT *pctxt)
 This function encodes a SOAP envelope end element tag (<SOAP-ENV:Envelope/>).
int rtXmlEncFloat (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix, const OSDoubleFmt *pFmtSpec)
 This function encodes a variable of the XSD float type.
int rtXmlEncFloatAttr (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen, const OSDoubleFmt *pFmtSpec)
 This function encodes a variable of the XSD float type as an attribute.
int rtXmlEncHexBinary (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD hexBinary type.
int rtXmlEncHexBinaryAttr (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes a variable of the XSD hexBinary type as an attribute.
int rtXmlEncHexStrValue (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *data)
 This function encodes a variable of the XSD hexBinary type.
int rtXmlEncGYear (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a numeric gYear element into an XML string representation.
int rtXmlEncGYearMonth (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a numeric gYearMonth element into an XML string representation.
int rtXmlEncGMonth (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a numeric gMonth element into an XML string representation.
int rtXmlEncGMonthDay (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a numeric gMonthDay element into an XML string representation.
int rtXmlEncGDay (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a numeric gDay element into an XML string representation.
int rtXmlEncGYearValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a numeric gYear value into an XML string representation.
int rtXmlEncGYearMonthValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a numeric gYearMonth value into an XML string representation.
int rtXmlEncGMonthValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a numeric gMonth value into an XML string representation.
int rtXmlEncGMonthDayValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a numeric gMonthDay value into an XML string representation.
int rtXmlEncGDayValue (OSCTXT *pctxt, const OSXSDDateTime *pvalue)
 This function encodes a numeric gDay value into an XML string representation.
int rtXmlEncIndent (OSCTXT *pctxt)
 This function adds indentation whitespace to the output stream.
int rtXmlEncInt (OSCTXT *pctxt, OSINT32 value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD integer type.
int rtXmlEncIntValue (OSCTXT *pctxt, OSINT32 value)
 This function encodes a variable of the XSD integer type.
int rtXmlEncIntAttr (OSCTXT *pctxt, OSINT32 value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes a variable of the XSD integer type as an attribute (name="value").
int rtXmlEncIntPattern (OSCTXT *pctxt, OSINT32 value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix, const OSUTF8CHAR *pattern)
 This function encodes a variable of the XSD integer type using a pattern to specify the format of the integer value.
int rtXmlEncInt64 (OSCTXT *pctxt, OSINT64 value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD integer type.
int rtXmlEncInt64Value (OSCTXT *pctxt, OSINT64 value)
 This function encodes a variable of the XSD integer type.
int rtXmlEncInt64Attr (OSCTXT *pctxt, OSINT64 value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes a variable of the XSD integer type as an attribute (name="value").
int rtXmlEncNSAttrs (OSCTXT *pctxt)
 This function encodes namespace declaration attributes at the beginning of an XML document.
int rtXmlEncSoapArrayTypeAttr (OSCTXT *pctxt, const OSUTF8CHAR *name, const OSUTF8CHAR *value, size_t itemCount)
 This function encodes the special SOAP encoding attrType attribute which specifies the number and type of elements in a SOAP array.
int rtXmlEncStartDocument (OSCTXT *pctxt)
 This function encodes the XML header text at the beginning of an XML document.
int rtXmlEncStartElement (OSCTXT *pctxt, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix, OSBOOL terminate)
 This function encodes a start element tag value (<elemName>).
int rtXmlEncStartElement2 (OSCTXT *pctxt, const OSUTF8CHAR *elemName, size_t elemLen, const OSUTF8CHAR *nsPrefix, size_t nsPrefixLen, OSBOOL terminate)
 This function encodes a start element tag value (<elemName>).
int rtXmlEncStartSoapEnv (OSCTXT *pctxt)
 This function encodes a SOAP envelope start element tag.
int rtXmlEncString (OSCTXT *pctxt, OSXMLSTRING *pxmlstr, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD string type.
int rtXmlEncStringValue (OSCTXT *pctxt, const OSUTF8CHAR *value)
 This function encodes a variable of the XSD string type.
int rtXmlEncStringValue2 (OSCTXT *pctxt, const OSUTF8CHAR *value, size_t valueLen)
 This function encodes a variable of the XSD string type.
int rtXmlEncUTF8Attr (OSCTXT *pctxt, const OSUTF8CHAR *name, const OSUTF8CHAR *value)
 This function encodes an attribute in which the name and value are given as a null-terminated UTF-8 strings.
int rtXmlEncUTF8Attr2 (OSCTXT *pctxt, const OSUTF8CHAR *name, size_t nameLen, const OSUTF8CHAR *value, size_t valueLen)
 This function encodes an attribute in which the name and value are given as a UTF-8 strings with lengths.
int rtXmlEncUTF8Str (OSCTXT *pctxt, const OSUTF8CHAR *value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a UTF-8 string value.
int rtXmlEncUInt (OSCTXT *pctxt, OSUINT32 value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD unsigned integer type.
int rtXmlEncUIntValue (OSCTXT *pctxt, OSUINT32 value)
 This function encodes a variable of the XSD unsigned integer type.
int rtXmlEncUIntAttr (OSCTXT *pctxt, OSUINT32 value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes a variable of the XSD unsigned integer type as an attribute (name="value").
int rtXmlEncUInt64 (OSCTXT *pctxt, OSUINT64 value, const OSUTF8CHAR *elemName, const OSUTF8CHAR *nsPrefix)
 This function encodes a variable of the XSD integer type.
int rtXmlEncUInt64Value (OSCTXT *pctxt, OSUINT64 value)
 This function encodes a variable of the XSD integer type.
int rtXmlEncUInt64Attr (OSCTXT *pctxt, OSUINT64 value, const OSUTF8CHAR *attrName, OSUINT16 attrNameLen)
 This function encodes a variable of the XSD integer type as an attribute (name="value").
int rtXmlEncXSIAttrs (OSCTXT *pctxt, OSBOOL needXSI)
 This function encodes XML schema instance (XSI) attributes at the beginning of an XML document.
int rtXmlFreeInputSource (OSCTXT *pctxt)
 This function closes an input source that was previously created with one of the create input source functions such as 'rtXmlCreateFileInputSource'.
int rtXmlSetEncBufPtr (OSCTXT *pctxt, OSOCTET *bufaddr, size_t bufsiz)
 This function is used to set the internal buffer within the run-time library encoding context.
int rtXmlGetIndent (OSCTXT *pctxt)
 This function returns current XML output indent value.
int rtXmlGetIndentChar (OSCTXT *pctxt)
 This function returns current XML output indent character value (default is space).
int rtXmlSetEncDocHdr (OSCTXT *pctxt, OSBOOL value)
 This function sets the option to add the XML document header (i.e.
int rtXmlSetEncoding (OSCTXT *pctxt, OSXMLEncoding encoding)
 This function sets the XML output encoding to the given value.
int rtXmlSetFormatting (OSCTXT *pctxt, OSBOOL doFormatting)
 This function sets XML output formatting to the given value.
int rtXmlSetIndent (OSCTXT *pctxt, OSUINT8 indent)
 This function sets XML output indent to the given value.
int rtXmlSetIndentChar (OSCTXT *pctxt, char indentChar)
 This function sets XML output indent character to the given value.
int rtXmlSetSchemaLocation (OSCTXT *pctxt, const OSUTF8CHAR *schemaLocation)
 This function sets the XML Schema Instance (xsi) schema location attribute to be added to an encoded document.
int rtXmlSetNoNSSchemaLocation (OSCTXT *pctxt, const OSUTF8CHAR *schemaLocation)
 This function sets the XML Schema Instance (xsi) no namespace schema location attribute to be added to an encoded document.
int rtXmlSetXSITypeAttr (OSCTXT *pctxt, const OSUTF8CHAR *xsiType)
 This function sets the XML Schema Instance (xsi) type attribute value.
int rtXmlSetEncodingStr (OSCTXT *pctxt, const OSUTF8CHAR *encodingStr)
 Sets the encoding name for the document.
int rtXmlMatchHexStr (OSCTXT *pctxt, size_t minLength, size_t maxLength)
 This function tests the context buffer for containing a correct hexadecimal string.
int rtXmlMatchBase64Str (OSCTXT *pctxt, size_t minLength, size_t maxLength)
 This function tests the context buffer for containing a correct base64 string.
int rtXmlMatchDate (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct date string.
int rtXmlMatchTime (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct time string.
int rtXmlMatchDateTime (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct dateTime string.
int rtXmlMatchGYear (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct gYear string.
int rtXmlMatchGYearMonth (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct gYearMonth string.
int rtXmlMatchGMonth (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct gMonth string.
int rtXmlMatchGMonthDay (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct gMonthDay string.
int rtXmlMatchGDay (OSCTXT *pctxt)
 This function tests the context buffer for containing a correct gDay string.
int rtSaxGetElemID (OSINT16 *pState, OSINT16 prevElemIdx, const OSUTF8CHAR *localName, const OSSAXElemTableRec idtab[], const int *fstab, int fstabRows, int fstabCols)
 This function looks up a sequence element name in the given element info array.
int rtSaxGetElemID8 (OSINT16 *pState, OSINT16 prevElemIdx, const OSUTF8CHAR *localName, const OSSAXElemTableRec idtab[], const OSINT8 *fstab, int fstabRows, int fstabCols)
 This function is a space optimized version of rtSaxGetElemID.
OSBOOL rtSaxIsEmptyBuffer (OSCTXT *pctxt, int whitespace)
 This function checks is the buffer in the context empty or not.
int rtSaxStrListParse (OSCTXT *pctxt, OSMemBuf *pMemBuf, OSRTDList *pvalue)
 This function parses the list of strings.
int rtSaxStrListMatch (OSCTXT *pctxt)
 This function mathes the list of strings.


Detailed Description

XML low-level C encode/decode functions.

Definition in file osrtxml.h.


Function Documentation

int rtSaxGetElemID OSINT16 pState,
OSINT16  prevElemIdx,
const OSUTF8CHAR localName,
const OSSAXElemTableRec  idtab[],
const int *  fstab,
int  fstabRows,
int  fstabCols
 

This function looks up a sequence element name in the given element info array.

If ensures elements are received in the correct order and also sets the required element count variable.

Parameters:
pState The pointer to state variable to be changed.
prevElemIdx Previous index of element. The search will be started from this element for better performance.
localName Local name of XML element
idtab Element ID table
fstab Finite state table
fstabRows Number of rows in fstab.
fstabCols Number of columns in fstab.

int rtSaxGetElemID8 OSINT16 pState,
OSINT16  prevElemIdx,
const OSUTF8CHAR localName,
const OSSAXElemTableRec  idtab[],
const OSINT8 fstab,
int  fstabRows,
int  fstabCols
 

This function is a space optimized version of rtSaxGetElemID.

It operates with array of 8-bit integers (OSINT8) instead of 32-bit integers (int).

Parameters:
pState The pointer to state variable to be changed.
prevElemIdx Previous index of element. The search will be started from this element + 1 for better performance.
localName Local name of XML element
idtab Element ID table
fstab Finite state table (array of 8-bit integers)
fstabRows Number of rows in fstab.
fstabCols Number of columns in fstab.

OSBOOL rtSaxIsEmptyBuffer OSCTXT pctxt,
int  whitespace
 

This function checks is the buffer in the context empty or not.

Testing is performed accordingly to 'whitespace' rule.

Parameters:
pctxt Pointer to OSCTXT structure
whitespace One of the following constant:
  • OS_WHITESPACE_COLLAPSE
  • OS_WHITESPACE_PRESERVE
  • OS_WHITESPACE_REPLACE
Returns:
TRUE, if the buffer contains empty string.

int rtSaxStrListMatch OSCTXT pctxt  ) 
 

This function mathes the list of strings.

It is used for matching NMTOKENS, IDREFS, NMENTITIES.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
0 - if success, negative value is error.

int rtSaxStrListParse OSCTXT pctxt,
OSMemBuf pMemBuf,
OSRTDList pvalue
 

This function parses the list of strings.

It is used for parsing NMTOKENS, IDREFS, NMENTITIES.

Parameters:
pctxt Pointer to OSCTXT structure. Can be NULL, if pMemBuf is not NULL.
pMemBuf Pointer to memory buffer structure. Can be NULL, if pctxt is not NULL.
pvalue Doubly-linked list for parsed strings.
Returns:
0 - if success, negative value is error.

int rtXmlCreateFileInputSource OSCTXT pctxt,
const char *  filepath
 

This function creates an XML document file input source.

The document can then be decoded by invoking an XML decode function.

Parameters:
pctxt Pointer to context block structure.
filepath Full pathname of XML document file to open.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.

int rtXmlInitContext OSCTXT pctxt  ) 
 

This function initializes a context variable for XML encoding or decoding.

Parameters:
pctxt Pointer to OSCTXT structure

int rtXmlMatchBase64Str OSCTXT pctxt,
size_t  minLength,
size_t  maxLength
 

This function tests the context buffer for containing a correct base64 string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
minLength A minimal length of expected string.
maxLength A maximal length of expected string.
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchDate OSCTXT pctxt  ) 
 

This function tests the context buffer for containing a correct date string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchDateTime OSCTXT pctxt  ) 
 

This function tests the context buffer for containing a correct dateTime string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchGDay OSCTXT pctxt  ) 
 

This function tests the context buffer for containing a correct gDay string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchGMonth OSCTXT pctxt  ) 
 

This function tests the context buffer for containing a correct gMonth string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchGMonthDay OSCTXT pctxt  ) 
 

This function tests the context buffer for containing a correct gMonthDay string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchGYear OSCTXT pctxt  ) 
 

This function tests the context buffer for containing a correct gYear string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchGYearMonth OSCTXT pctxt  ) 
 

This function tests the context buffer for containing a correct gYearMonth string.

It does not decode the value.

Parameters:
pctxt Pointer to OSCTXT structure
Returns:
If the string in the context buffer is a correct one, function returns zero. Error code (negative) will be returned otherwise. Note, error record will NOT be added in the error's list of the context.

int rtXmlMatchHexStr OSCTXT pctxt,
size_t  minLength,