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 "rtxmlsrc/rtXmlExternDefs.h"
#include "rtxmlsrc/rtXmlErrCodes.h"
#include "rtxmlsrc/rtXmlNamespace.h"
Go to the source code of this file.
Classes | |
struct | OSXMLGroupDesc |
OSXMLGroupDesc describes how entries in an OSXMLElemIDRec array make up a group. More... | |
Defines | |
#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. | |
Typedefs | |
typedef struct OSXMLGroupDesc | OSXMLGroupDesc |
OSXMLGroupDesc describes how entries in an OSXMLElemIDRec array make up a group. | |
Enumerations | |
enum | OSXMLWhiteSpaceMode |
Whitespace treatment options. | |
Functions | |
int | rtXmlInitContext (OSCTXT *pctxt) |
This function initializes a context variable for XML encoding or decoding. | |
int | rtXmlInitContextUsingKey (OSCTXT *pctxt, const OSOCTET *key, OSSIZE keylen) |
This function initializes a context using a run-time key. | |
int | rtXmlInitCtxtAppInfo (OSCTXT *pctxt) |
This function initializes the XML application info section of the given context. | |
int | rtXmlCreateFileInputSource (OSCTXT *pctxt, const char *filepath) |
This function creates an XML document file input source. | |
void | rtXmlMemFreeAnyAttrs (OSCTXT *pctxt, OSRTDList *pAnyAttrList) |
This function frees a list of anyAttribute that is a member of OSXSDAnyType structure. | |
int | rtXmlDecBase64Binary (OSRTMEMBUF *pMemBuf, const OSUTF8CHAR *inpdata, OSSIZE length) |
This function decodes the contents of a Base64-encoded binary data type into a memory buffer. | |
int | rtXmlDecBase64Str (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *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, OSSIZE bufSize, OSSIZE 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) |
This function decodes the contents of a decimal data type. | |
int | rtXmlDecDouble (OSCTXT *pctxt, OSREAL *pvalue) |
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 | rtXmlDecEmptyElement (OSCTXT *pctxt) |
This function is used to enforce a requirement that an element be empty. | |
int | rtXmlDecUTF8Str (OSCTXT *pctxt, OSUTF8CHAR *outdata, OSSIZE max_len) |
This function decodes the contents of a UTF-8 string data type. | |
int | rtXmlDecDynUTF8Str (OSCTXT *pctxt, const OSUTF8CHAR **outdata) |
This function decodes the contents of a UTF-8 string data type. | |
int | rtXmlDecHexBinary (OSRTMEMBUF *pMemBuf, const OSUTF8CHAR *inpdata, OSSIZE length) |
This function decodes the contents of a hex-encoded binary data type into a memory buffer. | |
int | rtXmlDecHexStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *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. | |
int | rtXmlDecNSAttr (OSCTXT *pctxt, const OSUTF8CHAR *attrName, const OSUTF8CHAR *attrValue, OSRTDList *pNSAttrs, const OSUTF8CHAR *nsTable[], OSUINT32 nsTableRowCount) |
This function decodes an XML namespac attribute (xmlns). | |
const OSUTF8CHAR * | rtXmlDecQName (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 | rtXmlDecXmlStr (OSCTXT *pctxt, OSXMLSTRING *outdata) |
This function decodes the contents of an XML string data type. | |
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, OSXMLNamespace *pNS) |
This function encodes a variable of the XSD any type. | |
int | rtXmlEncAnyTypeValue (OSCTXT *pctxt, const OSUTF8CHAR *pvalue) |
This function encodes a variable of the XSD anyType 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, OSXMLNamespace *pNS) |
This function encodes a variable of the XSD base64Binary type. | |
int | rtXmlEncBase64BinaryAttr (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value, const OSUTF8CHAR *attrName, OSSIZE 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, OSXMLNamespace *pNS) |
This function encodes a variable of the XSD integer type. | |
int | rtXmlEncBigIntAttr (OSCTXT *pctxt, const OSUTF8CHAR *value, const OSUTF8CHAR *attrName, OSSIZE 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 | rtXmlEncBitString (OSCTXT *pctxt, OSUINT32 nbits, const OSOCTET *value, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a variable of the ASN.1 BIT STRING type. | |
int | rtXmlEncBinStrValue (OSCTXT *pctxt, OSUINT32 nbits, const OSOCTET *data) |
This function encodes a binary string value as a sequence of '1's and '0's. | |
int | rtXmlEncBool (OSCTXT *pctxt, OSBOOL value, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
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, OSSIZE attrNameLen) |
This function encodes an XSD boolean attribute value. | |
int | rtXmlEncComment (OSCTXT *pctxt, const OSUTF8CHAR *comment) |
This function encodes an XML comment. | |
int | rtXmlEncDate (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
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, OSXMLNamespace *pNS) |
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, OSXMLNamespace *pNS) |
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, OSXMLNamespace *pNS, const OSDecimalFmt *pFmtSpec) |
This function encodes a variable of the XSD decimal type. | |
int | rtXmlEncDecimalAttr (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *attrName, OSSIZE 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, OSSIZE destBufSize) |
This function encodes a value of the XSD decimal type. | |
int | rtXmlEncDouble (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS, const OSDoubleFmt *pFmtSpec) |
This function encodes a variable of the XSD double type. | |
int | rtXmlEncDoubleAttr (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *attrName, OSSIZE attrNameLen, const OSDoubleFmt *pFmtSpec) |
This function encodes a variable of the XSD double type as an attribute. | |
int | rtXmlEncDoubleNormalValue (OSCTXT *pctxt, OSREAL value, const OSDoubleFmt *pFmtSpec, int defaultPrecision) |
This function encodes a normal (not +/-INF or NaN) value of the XSD double or float type. | |
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, OSXMLNamespace *pNS, OSRTDList *pNSAttrs, 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, OSXMLNamespace *pNS) |
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 | rtXmlEncEndSoapElems (OSCTXT *pctxt, OSXMLSOAPMsgType msgtype) |
This function encodes SOAP end element tags. | |
int | rtXmlEncFloat (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS, const OSDoubleFmt *pFmtSpec) |
This function encodes a variable of the XSD float type. | |
int | rtXmlEncFloatAttr (OSCTXT *pctxt, OSREAL value, const OSUTF8CHAR *attrName, OSSIZE attrNameLen, const OSDoubleFmt *pFmtSpec) |
This function encodes a variable of the XSD float type as an attribute. | |
int | rtXmlEncGYear (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a numeric gYear element into an XML string representation. | |
int | rtXmlEncGYearMonth (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a numeric gYearMonth element into an XML string representation. | |
int | rtXmlEncGMonth (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a numeric gMonth element into an XML string representation. | |
int | rtXmlEncGMonthDay (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a numeric gMonthDay element into an XML string representation. | |
int | rtXmlEncGDay (OSCTXT *pctxt, const OSXSDDateTime *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
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 | rtXmlEncHexBinary (OSCTXT *pctxt, OSSIZE nocts, const OSOCTET *value, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a variable of the XSD hexBinary type. | |
int | rtXmlEncHexBinaryAttr (OSCTXT *pctxt, OSUINT32 nocts, const OSOCTET *value, const OSUTF8CHAR *attrName, OSSIZE attrNameLen) |
This function encodes a variable of the XSD hexBinary type as an attribute. | |
int | rtXmlEncHexStrValue (OSCTXT *pctxt, OSSIZE nocts, const OSOCTET *data) |
This function encodes a variable of the XSD hexBinary type. | |
int | rtXmlEncIndent (OSCTXT *pctxt) |
This function adds indentation whitespace to the output stream. | |
int | rtXmlEncInt (OSCTXT *pctxt, OSINT32 value, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
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, OSSIZE 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, OSXMLNamespace *pNS, 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, OSXMLNamespace *pNS) |
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, OSSIZE attrNameLen) |
This function encodes a variable of the XSD integer type as an attribute (name="value"). | |
int | rtXmlEncNamedBits (OSCTXT *pctxt, const OSBitMapItem *pBitMap, OSUINT32 nbits, const OSOCTET *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a variable of the ASN.1 BIT STRING type. | |
int | rtXmlEncNSAttrs (OSCTXT *pctxt, OSRTDList *pNSAttrs) |
This function encodes namespace declaration attributes at the beginning of an XML document. | |
int | rtXmlPrintNSAttrs (const char *name, const OSRTDList *data) |
This function prints a list of namespace attributes. | |
int | rtXmlEncReal10 (OSCTXT *pctxt, const OSUTF8CHAR *pvalue, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a variable of the ASN.1 REAL base 10 type. | |
int | rtXmlEncSoapArrayTypeAttr (OSCTXT *pctxt, const OSUTF8CHAR *name, const OSUTF8CHAR *value, OSSIZE 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 | rtXmlEncBOM (OSCTXT *pctxt) |
This function encodes the Unicode byte order mark header at the start of the document. | |
int | rtXmlEncStartElement (OSCTXT *pctxt, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS, OSRTDList *pNSAttrs, OSBOOL terminate) |
This function encodes a start element tag value (<elemName>). | |
int | rtXmlEncStartSoapEnv (OSCTXT *pctxt, OSRTDList *pNSAttrs) |
This function encodes a SOAP envelope start element tag. | |
int | rtXmlEncStartSoapElems (OSCTXT *pctxt, OSXMLSOAPMsgType msgtype) |
This function encodes a SOAP envelope start element tag and an optional SOAP body or fault tag. | |
int | rtXmlEncString (OSCTXT *pctxt, OSXMLSTRING *pxmlstr, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
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, OSSIZE valueLen) |
This function encodes a variable of the XSD string type. | |
int | rtXmlEncTermStartElement (OSCTXT *pctxt) |
This function terminates a currently open XML start element by adding either a '>' or '/>' (if empty) terminator. | |
int | rtXmlEncUnicodeStr (OSCTXT *pctxt, const OSUNICHAR *value, OSSIZE nchars, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
This function encodes a Unicode string value. | |
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, OSSIZE nameLen, const OSUTF8CHAR *value, OSSIZE 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, OSXMLNamespace *pNS) |
This function encodes a UTF-8 string value. | |
int | rtXmlEncUInt (OSCTXT *pctxt, OSUINT32 value, const OSUTF8CHAR *elemName, OSXMLNamespace *pNS) |
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, OSSIZE 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, OSXMLNamespace *pNS) |
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, OSSIZE 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 | rtXmlEncXSITypeAttr (OSCTXT *pctxt, const OSUTF8CHAR *value) |
This function encodes an XML schema instance (XSI) type attribute value (xsi:type="value"). | |
int | rtXmlEncXSITypeAttr2 (OSCTXT *pctxt, const OSUTF8CHAR *typeNsUri, const OSUTF8CHAR *typeName) |
This function encodes an XML schema instance (XSI) type attribute value (xsi:type="pfx:value"). | |
int | rtXmlEncXSINilAttr (OSCTXT *pctxt) |
This function encodes an XML nil attribute (xsi:nil="true"). | |
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, OSSIZE 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. | |
OSBOOL | rtXmlGetWriteBOM (OSCTXT *pctxt) |
This function returns whether the Unicode byte order mark will be encoded. | |
int | rtXmlGetIndentChar (OSCTXT *pctxt) |
This function returns current XML output indent character value (default is space). | |
int | rtXmlPrepareContext (OSCTXT *pctxt) |
This function prepares the context for another encode by setting the state back to OSXMLINIT and moving the buffer's cursor back to the beginning of the buffer. | |
int | rtXmlSetEncC14N (OSCTXT *pctxt, OSBOOL value) |
This function sets the option to encode in C14N mode. | |
int | rtXmlSetEncXSINamespace (OSCTXT *pctxt, OSBOOL value) |
This function sets a flag in the context that indicates the XSI namespace declaration (xmlns:xsi) should be added to the encoded XML instance. | |
int | rtXmlSetEncXSINilAttr (OSCTXT *pctxt, OSBOOL value) |
This function sets a flag in the context that indicates the XSI attribute declaration (xmlns:xsi) should be added to the encoded XML instance. | |
int | rtXmlSetEncDocHdr (OSCTXT *pctxt, OSBOOL value) |
This function sets the option to add the XML document header (i.e. | |
int | rtXmlSetEncodingStr (OSCTXT *pctxt, const OSUTF8CHAR *encodingStr) |
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. | |
void | rtXmlSetNamespacesSet (OSCTXT *pctxt, OSBOOL value) |
This function sets the context 'namespaces are set' flag. | |
int | rtXmlSetNSPrefixLinks (OSCTXT *pctxt, OSRTDList *pNSAttrs) |
This function sets namespace prefix/URI links in the namspace prefix stack in the context structure. | |
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. | |
void | rtXmlSetSoapVersion (OSCTXT *pctxt, OSUINT8 version) |
This function sets the SOAP version number. | |
int | rtXmlSetXSITypeAttr (OSCTXT *pctxt, const OSUTF8CHAR *xsiType) |
This function sets the XML Schema Instance (xsi) type attribute value. | |
int | rtXmlSetWriteBOM (OSCTXT *pctxt, OSBOOL write) |
This function sets whether the Unicode byte order mark is encoded. | |
int | rtXmlMatchHexStr (OSCTXT *pctxt, OSSIZE minLength, OSSIZE maxLength) |
This function tests the context buffer for containing a correct hexadecimal string. | |
int | rtXmlMatchBase64Str (OSCTXT *pctxt, OSSIZE minLength, OSSIZE 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. | |
OSUTF8CHAR * | rtXmlNewQName (OSCTXT *pctxt, const OSUTF8CHAR *localName, const OSUTF8CHAR *prefix) |
This function creates a new QName given the localName and prefix parts. | |
OSBOOL | rtXmlCmpBase64Str (OSUINT32 nocts1, const OSOCTET *data1, const OSUTF8CHAR *data2) |
This function compares an array of octets to a base64 string. | |
OSBOOL | rtXmlCmpHexStr (OSUINT32 nocts1, const OSOCTET *data1, const OSUTF8CHAR *data2) |
This function compares an array of octets to a hex string. | |
const OSUTF8CHAR * | rtSaxGetAttrValue (const OSUTF8CHAR *attrName, const OSUTF8CHAR *const *attrs) |
This function looks up an attribute in the attribute array returned by SAX to the startElement function. | |
OSINT16 | rtSaxGetElemID (OSINT16 *pState, OSINT16 prevElemIdx, const OSUTF8CHAR *localName, OSINT32 nsidx, const OSSAXElemTableRec idtab[], const OSINT16 *fstab, OSINT16 fstabRows, OSINT16 fstabCols) |
This function looks up a sequence element name in the given element info array. | |
OSINT16 | rtSaxGetElemID8 (OSINT16 *pState, OSINT16 prevElemIdx, const OSUTF8CHAR *localName, OSINT32 nsidx, const OSSAXElemTableRec idtab[], const OSINT8 *fstab, OSINT16 fstabRows, OSINT16 fstabCols) |
This function is a space optimized version of rtSaxGetElemID . | |
OSBOOL | rtSaxHasXMLNSAttrs (const OSUTF8CHAR *const *attrs) |
This function checks if the given attribute list contains one or more XML namespace attributes (xmlns). | |
OSBOOL | rtSaxIsEmptyBuffer (OSCTXT *pctxt) |
This function checks if the buffer in the context is empty or not. | |
int | rtSaxStrListParse (OSCTXT *pctxt, OSRTMEMBUF *pMemBuf, OSRTDList *pvalue) |
This function parses the list of strings. | |
int | rtSaxSortAttrs (OSCTXT *pctxt, const OSUTF8CHAR *const *attrs, OSUINT16 **order) |
This function sorts a SAX attribute list in ascending order based on attribute name. | |
int | rtSaxStrListMatch (OSCTXT *pctxt) |
This function mathes the list of strings. | |
int | rtXmlWriteToFile (OSCTXT *pctxt, const char *filename) |
This function writes the encoded XML message stored in the context message buffer out to a file. | |
int | rtXmlpDecAny (OSCTXT *pctxt, const OSUTF8CHAR **pvalue) |
This function decodes an arbitrary XML section of code as defined by the XSD any type (xsd:any). | |
int | rtXmlpDecAny2 (OSCTXT *pctxt, OSUTF8CHAR **pvalue) |
This version of the rtXmlpDecAny function returns the string in a mutable buffer. | |
int | rtXmlpDecAnyAttrStr (OSCTXT *pctxt, const OSUTF8CHAR **ppAttrStr, OSSIZE attrIndex) |
This function decodes an any attribute string. | |
int | rtXmlpDecAnyElem (OSCTXT *pctxt, const OSUTF8CHAR **pvalue) |
This function decodes an arbitrary XML section of code as defined by the XSD any type (xsd:any). | |
int | rtXmlpDecBase64Str (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, OSSIZE bufsize) |
This function decodes a contents of a Base64-encode binary string into a static memory structure. | |
int | rtXmlpDecBigInt (OSCTXT *pctxt, const OSUTF8CHAR **pvalue) |
This function will decode a variable of the XSD integer type. | |
int | rtXmlpDecBitString (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnbits, OSUINT32 bufsize) |
This function decodes a bit string value. | |
int | rtXmlpDecBool (OSCTXT *pctxt, OSBOOL *pvalue) |
This function decodes a variable of the boolean type. | |
int | rtXmlpDecDate (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'date' type. | |
int | rtXmlpDecDateTime (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'dateTime' type. | |
int | rtXmlpDecDecimal (OSCTXT *pctxt, OSREAL *pvalue, int totalDigits, int fractionDigits) |
This function decodes the contents of a decimal data type. | |
int | rtXmlpDecDouble (OSCTXT *pctxt, OSREAL *pvalue) |
This function decodes the contents of a float or double data type. | |
int | rtXmlpDecDoubleExt (OSCTXT *pctxt, OSUINT8 flags, OSREAL *pvalue) |
This function decodes the contents of a float or double data type. | |
int | rtXmlpDecDynBase64Str (OSCTXT *pctxt, OSDynOctStr *pvalue) |
This function decodes a contents of a Base64-encode binary string. | |
int | rtXmlpDecDynBitString (OSCTXT *pctxt, OSDynOctStr *pvalue) |
This function decodes a bit string value. | |
int | rtXmlpDecDynHexStr (OSCTXT *pctxt, OSDynOctStr *pvalue) |
This function decodes a contents of a hexBinary string. | |
int | rtXmlpDecDynUnicodeStr (OSCTXT *pctxt, const OSUNICHAR **ppdata, OSSIZE *pnchars) |
This function decodes a Unicode string data type. | |
int | rtXmlpDecDynUTF8Str (OSCTXT *pctxt, const OSUTF8CHAR **outdata) |
This function decodes the contents of a UTF-8 string data type. | |
int | rtXmlpDecUTF8Str (OSCTXT *pctxt, OSUTF8CHAR *out, OSSIZE max_len) |
This function decodes the contents of a UTF-8 string data type. | |
int | rtXmlpDecGDay (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gDay' type. | |
int | rtXmlpDecGMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gMonth' type. | |
int | rtXmlpDecGMonthDay (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gMonthDay' type. | |
int | rtXmlpDecGYear (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gYear' type. | |
int | rtXmlpDecGYearMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gYearMonth' type. | |
int | rtXmlpDecHexStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, OSINT32 bufsize) |
This function decodes the contents of a hexBinary string into a static memory structure. | |
int | rtXmlpDecInt (OSCTXT *pctxt, OSINT32 *pvalue) |
This function decodes the contents of a 32-bit integer data type. | |
int | rtXmlpDecInt8 (OSCTXT *pctxt, OSINT8 *pvalue) |
This function decodes the contents of an 8-bit integer data type (i.e. | |
int | rtXmlpDecInt16 (OSCTXT *pctxt, OSINT16 *pvalue) |
This function decodes the contents of a 16-bit integer data type. | |
int | rtXmlpDecInt64 (OSCTXT *pctxt, OSINT64 *pvalue) |
This function decodes the contents of a 64-bit integer data type. | |
int | rtXmlpDecNamedBits (OSCTXT *pctxt, const OSBitMapItem *pBitMap, OSOCTET *pvalue, OSUINT32 *pnbits, OSUINT32 bufsize) |
This function decodes the contents of a named bit field. | |
int | rtXmlpDecStrList (OSCTXT *pctxt, OSRTDList *plist) |
This function decodes a list of space-separated tokens and returns each token as a separate item on the given list. | |
int | rtXmlpDecTime (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'time' type. | |
int | rtXmlpDecUInt (OSCTXT *pctxt, OSUINT32 *pvalue) |
This function decodes the contents of an unsigned 32-bit integer data type. | |
int | rtXmlpDecUInt8 (OSCTXT *pctxt, OSOCTET *pvalue) |
This function decodes the contents of an unsigned 8-bit integer data type (i.e. | |
int | rtXmlpDecUInt16 (OSCTXT *pctxt, OSUINT16 *pvalue) |
This function decodes the contents of an unsigned 16-bit integer data type. | |
int | rtXmlpDecUInt64 (OSCTXT *pctxt, OSUINT64 *pvalue) |
This function decodes the contents of an unsigned 64-bit integer data type. | |
int | rtXmlpDecXmlStr (OSCTXT *pctxt, OSXMLSTRING *outdata) |
This function decodes the contents of an XML string data type. | |
int | rtXmlpDecXmlStrList (OSCTXT *pctxt, OSRTDList *plist) |
This function decodes a list of space-separated tokens and returns each token as a separate item on the given list. | |
int | rtXmlpDecXSIAttr (OSCTXT *pctxt, const OSXMLNameFragments *attrName) |
This function decodes XSI (XML Schema Instance) attributes that may be present in any arbitrary XML element within a document. | |
int | rtXmlpDecXSITypeAttr (OSCTXT *pctxt, const OSXMLNameFragments *attrName, const OSUTF8CHAR **ppAttrValue) |
This function decodes the contents of an XSI (XML Schema Instance) type attribute (xsi:type). | |
int | rtXmlpGetAttributeID (const OSXMLStrFragment *attrName, OSINT16 nsidx, OSSIZE nAttr, const OSXMLAttrDescr attrNames[], OSUINT32 attrPresent[]) |
This function finds an attribute in the descriptor table. | |
int | rtXmlpGetNextElem (OSCTXT *pctxt, OSXMLElemDescr *pElem, OSINT32 level) |
This function parse the next element start tag. | |
int | rtXmlpGetNextElemID (OSCTXT *pctxt, const OSXMLElemIDRec *tab, OSSIZE nrows, OSINT32 level, OSBOOL continueParse) |
This function parses the next start tag and finds the index of the element name in the descriptor table. | |
int | rtXmlpMarkLastEventActive (OSCTXT *pctxt) |
This function marks current tag as unprocessed. | |
int | rtXmlpMatchStartTag (OSCTXT *pctxt, const OSUTF8CHAR *elemLocalName, OSINT16 nsidx) |
This function parses the next start tag that matches with given name. | |
int | rtXmlpMatchEndTag (OSCTXT *pctxt, OSINT32 level) |
This function parse next end tag that matches with given name. | |
OSBOOL | rtXmlpHasAttributes (OSCTXT *pctxt) |
This function checks accessibility of attributes. | |
int | rtXmlpGetAttributeCount (OSCTXT *pctxt) |
This function returns number of attributes in last processed start tag. | |
int | rtXmlpSelectAttribute (OSCTXT *pctxt, OSXMLNameFragments *pAttr, OSINT16 *nsidx, OSSIZE attrIndex) |
This function selects attribute to decode. | |
OSINT32 | rtXmlpGetCurrentLevel (OSCTXT *pctxt) |
This function returns current nesting level. | |
void | rtXmlpSetWhiteSpaceMode (OSCTXT *pctxt, OSXMLWhiteSpaceMode whiteSpaceMode) |
Sets the whitespace treatment mode. | |
OSBOOL | rtXmlpSetMixedContentMode (OSCTXT *pctxt, OSBOOL mixedContentMode) |
Sets mixed content mode. | |
void | rtXmlpSetListMode (OSCTXT *pctxt) |
Sets list mode. | |
OSBOOL | rtXmlpListHasItem (OSCTXT *pctxt) |
Check for end of decoded token list. | |
void | rtXmlpCountListItems (OSCTXT *pctxt, OSSIZE *itemCnt) |
Count tokens in list. | |
int | rtXmlpGetNextSeqElemID2 (OSCTXT *pctxt, const OSXMLElemIDRec *tab, const OSXMLGroupDesc *pGroup, int groups, int curID, int lastMandatoryID, OSBOOL groupMode, OSBOOL checkRepeat) |
This function parses the next start tag and finds index of element name in descriptor table. | |
int | rtXmlpGetNextSeqElemID (OSCTXT *pctxt, const OSXMLElemIDRec *tab, const OSXMLGroupDesc *pGroup, int curID, int lastMandatoryID, OSBOOL groupMode) |
This function parses the next start tag and finds index of element name in descriptor table. | |
int | rtXmlpGetNextSeqElemIDExt (OSCTXT *pctxt, const OSXMLElemIDRec *tab, const OSXMLGroupDesc *ppGroup, const OSBOOL *extRequired, int postExtRootID, int curID, int lastMandatoryID, OSBOOL groupMode) |
This is an ASN.1 extension-supporting version of rtXmlpGetNextSeqElemID. | |
int | rtXmlpGetNextAllElemID (OSCTXT *pctxt, const OSXMLElemIDRec *tab, OSSIZE nrows, const OSUINT8 *pOrder, OSSIZE nOrder, OSSIZE maxOrder, int anyID) |
This function parses the next start tag and finds index of element name in descriptor table. | |
int | rtXmlpGetNextAllElemID16 (OSCTXT *pctxt, const OSXMLElemIDRec *tab, OSSIZE nrows, const OSUINT16 *pOrder, OSSIZE nOrder, OSSIZE maxOrder, int anyID) |
This function parses the next start tag and finds index of element name in descriptor table. | |
int | rtXmlpGetNextAllElemID32 (OSCTXT *pctxt, const OSXMLElemIDRec *tab, OSSIZE nrows, const OSUINT32 *pOrder, OSSIZE nOrder, OSSIZE maxOrder, int anyID) |
This function parses the next start tag and finds index of element name in descriptor table. | |
void | rtXmlpSetNamespaceTable (OSCTXT *pctxt, const OSUTF8CHAR *namespaceTable[], OSSIZE nmNamespaces) |
Sets user namespace table. | |
int | rtXmlpCreateReader (OSCTXT *pctxt) |
Creates pull parser reader structure within the context. | |
void | rtXmlpHideAttributes (OSCTXT *pctxt) |
Disable access to attributes. | |
OSBOOL | rtXmlpNeedDecodeAttributes (OSCTXT *pctxt) |
This function checks if attributes were previously decoded. | |
void | rtXmlpMarkPos (OSCTXT *pctxt) |
Save current decode position. | |
void | rtXmlpRewindToMarkedPos (OSCTXT *pctxt) |
Rewind to saved decode position. | |
void | rtXmlpResetMarkedPos (OSCTXT *pctxt) |
Reset saved decode position. | |
int | rtXmlpGetXSITypeAttr (OSCTXT *pctxt, const OSUTF8CHAR **ppAttrValue, OSINT16 *nsidx, OSSIZE *pLocalOffs) |
This function decodes the contents of an XSI (XML Schema Instance) type attribute (xsi:type). | |
int | rtXmlpGetXmlnsAttrs (OSCTXT *pctxt, OSRTDList *pNSAttrs) |
This function decodes namespace attributes from start tag and adds them to the given list. | |
int | rtXmlpDecXSIAttrs (OSCTXT *pctxt) |
This function decodes XSI (XML Schema Instance) that may be present in any arbitrary XML element within a document. | |
OSBOOL | rtXmlpIsEmptyElement (OSCTXT *pctxt) |
Check element content: empty or not. | |
int | rtXmlEncAttrC14N (OSCTXT *pctxt) |
This function used only in C14 mode. | |
struct OSXMLReader * | rtXmlpGetReader (OSCTXT *pctxt) |
This function fetches the XML reader structure from the context for use in low-level pull parser calls. | |
OSBOOL | rtXmlpIsLastEventDone (OSCTXT *pctxt) |
Check processing status of current tag. | |
int | rtXmlpGetXSITypeIndex (OSCTXT *pctxt, const OSXMLItemDescr typetab[], OSSIZE typetabsiz) |
This function decodes the contents of an XSI (XML Schema Instance) type attribute (xsi:type) and find type index in descriptor table. | |
int | rtXmlpLookupXSITypeIndex (OSCTXT *pctxt, const OSUTF8CHAR *pXsiType, OSINT16 xsiTypeIdx, const OSXMLItemDescr typetab[], OSSIZE typetabsiz) |
This function find index of XSI (XML Schema Instance) type in descriptor table. | |
void | rtXmlpForceDecodeAsGroup (OSCTXT *pctxt) |
Disable skipping of unknown elements in optional sequence tail. | |
OSBOOL | rtXmlpIsDecodeAsGroup (OSCTXT *pctxt) |
This function checks if "decode as group" mode was forced. | |
OSBOOL | rtXmlpIsUTF8Encoding (OSCTXT *pctxt) |
This function checks if the encoding specified in XML header is UTF-8. | |
int | rtXmlpReadBytes (OSCTXT *pctxt, OSOCTET *pbuf, OSSIZE nbytes) |
This function reads the specified number of bytes directly from the underlying XML parser stream. |
Detailed Description
XML low-level C encode/decode functions.
Definition in file osrtxml.h.
Typedef Documentation
typedef struct OSXMLGroupDesc OSXMLGroupDesc |
OSXMLGroupDesc describes how entries in an OSXMLElemIDRec array make up a group.
Here, "group" means a set of elements, any of which may be matched next. This does not correspond directly to an XSD group.
For example, if elementA is optional and followed by non-optional elementB, then there will be a group that contains both elements. There will also be a group that contains only elementB; this will be the group of interest after elementA is matched.
Function Documentation
const OSUTF8CHAR* rtSaxGetAttrValue | ( | const OSUTF8CHAR * | attrName, | |
const OSUTF8CHAR *const * | attrs | |||
) |
This function looks up an attribute in the attribute array returned by SAX to the startElement function.
- Parameters:
-
attrName Name of the attribute to find. attrs Attribute array returned in SAX startElement function. This is an array of character strings containing name1, value1, name2, value2, ... List is terminated by a null name.
- Returns:
- Pointer to character string containing attribute value or NULL if attrName not found.
OSINT16 rtSaxGetElemID | ( | OSINT16 * | pState, | |
OSINT16 | prevElemIdx, | |||
const OSUTF8CHAR * | localName, | |||
OSINT32 | nsidx, | |||
const OSSAXElemTableRec | idtab[], | |||
const OSINT16 * | fstab, | |||
OSINT16 | fstabRows, | |||
OSINT16 | 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 nsidx Namespace index idtab Element ID table fstab Finite state table fstabRows Number of rows in fstab
.fstabCols Number of columns in fstab
.
OSINT16 rtSaxGetElemID8 | ( | OSINT16 * | pState, | |
OSINT16 | prevElemIdx, | |||
const OSUTF8CHAR * | localName, | |||
OSINT32 | nsidx, | |||
const OSSAXElemTableRec | idtab[], | |||
const OSINT8 * | fstab, | |||
OSINT16 | fstabRows, | |||
OSINT16 | 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 nsidx Namespace index 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 rtSaxHasXMLNSAttrs | ( | const OSUTF8CHAR *const * | attrs | ) |
This function checks if the given attribute list contains one or more XML namespace attributes (xmlns).
- Parameters:
-
attrs Attribute list in form passed by parser into SAX startElement function.
- Returns:
- TRUE, if xmlns attribute found in list.
OSBOOL rtSaxIsEmptyBuffer | ( | OSCTXT * | pctxt | ) |
This function checks if the buffer in the context is empty or not.
- Parameters:
-
pctxt Pointer to OSCTXT structure
- Returns:
- TRUE, if the buffer contains empty string.
int rtSaxSortAttrs | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR *const * | attrs, | |||
OSUINT16 ** | order | |||
) |
This function sorts a SAX attribute list in ascending order based on attribute name.
It currently only supports unqualified attributes.
- Parameters:
-
pctxt Pointer to OSCTXT structure. attrs Standard SAX attribute list. Entry i is attribute name and i+1 is value. List is terminated by a null name. order Order array containing the order of sorted attributes. This array is allocated using rtxMemAlloc, it can be freed using rtxMemFreePtr or will be freed when the context is freed. The list holds indicies to name items in the attribute list that is passed in.
- Returns:
- If success, positive value contains number of attributes in attrs; if failure, negative status code.
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, | |
OSRTMEMBUF * | 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.
OSBOOL rtXmlCmpBase64Str | ( | OSUINT32 | nocts1, | |
const OSOCTET * | data1, | |||
const OSUTF8CHAR * | data2 | |||
) |
This function compares an array of octets to a base64 string.
- Parameters:
-
nocts1 Number of octets in data1. data1 Pointer to array of OSOCTET. data2 Pointer to null-terminated array of OSUTF8CHAR.
- Returns:
- TRUE if data2 is a base64 string representation of data1, false otherwise.
OSBOOL rtXmlCmpHexStr | ( | OSUINT32 | nocts1, | |
const OSOCTET * | data1, | |||
const OSUTF8CHAR * | data2 | |||
) |
This function compares an array of octets to a hex string.
- Parameters:
-
nocts1 Number of octets in data1. data1 Pointer to array of OSOCTET. data2 Pointer to null-terminated array of OSUTF8CHAR.
- Returns:
- TRUE if data2 is a hex string representation of data1, false otherwise.
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 rtXmlInitContextUsingKey | ( | OSCTXT * | pctxt, | |
const OSOCTET * | key, | |||
OSSIZE | keylen | |||
) |
This function initializes a context using a run-time key.
This form is required for evaluation and limited distribution software. The compiler will generate a macro for rtXmlInitContext in the rtkey.h file that will invoke this function with the generated run-time key.
- Parameters:
-
pctxt The pointer to the context structure variable to be initialized. key Key data generated by ASN1C compiler. keylen Key data field length.
- Returns:
- Completion status of operation:
- 0 (ASN_OK) = success,
- negative return value is error.
int rtXmlInitCtxtAppInfo | ( | OSCTXT * | pctxt | ) |
This function initializes the XML application info section of the given context.
- Parameters:
-
pctxt Pointer to OSCTXT structure
int rtXmlMatchBase64Str | ( | OSCTXT * | pctxt, | |
OSSIZE | minLength, | |||
OSSIZE | 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, | |
OSSIZE | minLength, | |||
OSSIZE | maxLength | |||
) |
This function tests the context buffer for containing a correct hexadecimal 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 rtXmlMatchTime | ( | OSCTXT * | pctxt | ) |
This function tests the context buffer for containing a correct time 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.
void rtXmlMemFreeAnyAttrs | ( | OSCTXT * | pctxt, | |
OSRTDList * | pAnyAttrList | |||
) |
This function frees a list of anyAttribute that is a member of OSXSDAnyType structure.
- Parameters:
-
pctxt Pointer to context block structure. pAnyAttrList Pointer to list of anyAttribute that is to be freed.
OSUTF8CHAR* rtXmlNewQName | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR * | localName, | |||
const OSUTF8CHAR * | prefix | |||
) |
This function creates a new QName given the localName and prefix parts.
- Parameters:
-
pctxt Pointer to a context structure. localName Element local name. prefix Namespace prefix.
- Returns:
- QName value. Memory for the value will have been allocated by rtxMemAlloc and thus must be freed using one of the rtxMemFree functions. The value will be NULL if no dynamic memory was available.
int rtXmlPrepareContext | ( | OSCTXT * | pctxt | ) |
This function prepares the context for another encode by setting the state back to OSXMLINIT and moving the buffer's cursor back to the beginning of the buffer.
- Parameters:
-
pctxt Pointer to OSCTXT structure
- Returns:
- 0 if OK, negative status code if error.
int rtXmlSetEncC14N | ( | OSCTXT * | pctxt, | |
OSBOOL | value | |||
) |
This function sets the option to encode in C14N mode.
- Parameters:
-
pctxt Pointer to OSCTXT structure value Boolean value: true = C14N mode enabled.
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetEncDocHdr | ( | OSCTXT * | pctxt, | |
OSBOOL | value | |||
) |
This function sets the option to add the XML document header (i.e.
<?xml version="1.0" encoding="UTF-8"?>) to the XML output stream.
- Parameters:
-
pctxt Pointer to OSCTXT structure value Boolean value: true = add document header
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetEncodingStr | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR * | encodingStr | |||
) |
This function sets the XML output encoding to the given value.
Currently, UTF-8/UTF-16/ISO-8859-1 encodings are supported.
- Parameters:
-
pctxt Pointer to OSCTXT structure encodingStr XML output encoding format
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetEncXSINamespace | ( | OSCTXT * | pctxt, | |
OSBOOL | value | |||
) |
This function sets a flag in the context that indicates the XSI namespace declaration (xmlns:xsi) should be added to the encoded XML instance.
- Parameters:
-
pctxt Pointer to OSCTXT structure value Boolean value: true = encode XSI namespace attribute.
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetEncXSINilAttr | ( | OSCTXT * | pctxt, | |
OSBOOL | value | |||
) |
This function sets a flag in the context that indicates the XSI attribute declaration (xmlns:xsi) should be added to the encoded XML instance.
- Parameters:
-
pctxt Pointer to OSCTXT structure value Boolean value: true = encode xsi:nil attribute.
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetFormatting | ( | OSCTXT * | pctxt, | |
OSBOOL | doFormatting | |||
) |
This function 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. Also the function 'rtXmlSetIndent' might be used to set the exact size of identation.
- Parameters:
-
pctxt Pointer to OSCTXT structure doFormatting Boolean value indicating if formatting is to be done
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetIndent | ( | OSCTXT * | pctxt, | |
OSUINT8 | indent | |||
) |
This function sets XML output indent to the given value.
- Parameters:
-
pctxt Pointer to OSCTXT structure indent Number of spaces per indent. Default is 3.
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetIndentChar | ( | OSCTXT * | pctxt, | |
char | indentChar | |||
) |
This function sets XML output indent character to the given value.
- Parameters:
-
pctxt Pointer to OSCTXT structure indentChar Indent character. Default is space.
- Returns:
- Status of operation: 0 if OK, negative status code if error.
void rtXmlSetNamespacesSet | ( | OSCTXT * | pctxt, | |
OSBOOL | value | |||
) |
This function sets the context 'namespaces are set' flag.
This indicates that namespace declarations have been set either by the decoder or externally by the end user. It is used by the encoder to know not to set the default namespaces specified in the schema before starting encoding.
- Parameters:
-
pctxt Pointer to OSCTXT structure. value Boolean value to which flag is to be set.
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.
This attribute is optional: if not set, no xsi:noNamespaceSchemaLocation attribute will be added.
- Parameters:
-
pctxt Pointer to OSCTXT structure schemaLocation Schema location attribute value
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetNSPrefixLinks | ( | OSCTXT * | pctxt, | |
OSRTDList * | pNSAttrs | |||
) |
This function sets namespace prefix/URI links in the namspace prefix stack in the context structure.
- Parameters:
-
pctxt Pointer to OSCTXT structure. pNSAttrs List of namespace attributes.
- Returns:
- Status of operation: 0 if OK, negative status code if error.
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.
This attribute is optional: if not set, no xsi:schemaLocation attribute will be added.
- Parameters:
-
pctxt Pointer to OSCTXT structure schemaLocation Schema location attribute value
- Returns:
- Status of operation: 0 if OK, negative status code if error.
void rtXmlSetSoapVersion | ( | OSCTXT * | pctxt, | |
OSUINT8 | version | |||
) |
This function sets the SOAP version number.
- Parameters:
-
pctxt Pointer to OSCTXT structure version SOAP version number as 2 digit integer (for example, 11 is SOAP version 1.1, 12 is version 1.2, etc.)
int rtXmlSetWriteBOM | ( | OSCTXT * | pctxt, | |
OSBOOL | write | |||
) |
This function sets whether the Unicode byte order mark is encoded.
- Parameters:
-
pctxt Pointer to OSCTXT structure write TRUE to encode BOM, FALSE to not encode BOM.
- Returns:
- Status of operation: 0 if OK, negative status code if error.
int rtXmlSetXSITypeAttr | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR * | xsiType | |||
) |
This function sets the XML Schema Instance (xsi) type attribute value.
This will cause an xsi:type attribute to be added to the top level element in an encoded XML instance.
- Parameters:
-
pctxt Pointer to OSCTXT structure xsiType xsi:type attribute value
- Returns:
- Status of operation: 0 if OK, negative status code if error.