XBinder XML Runtime  XBinder Version 3.0.x
Macros | Functions
XML pull-parser decode functions.

Macros

#define OSXMLREALENC_OBJSYS   0x1F /* Obj-Sys XML encoding rules */
 
#define OSXMLREALENC_BXER   0x10 /* basic-XER */
 
#define OSXMLREALENC_EXERMODS   0x1B /* extended-XER with MODIFIED-ENCODINGS */
 
#define OSXMLREALENC_EXERDECIMAL   0x03 /* extended-XER with DECIMAL */
 

Functions

EXTERNXML 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). More...
 
EXTERNXML int rtXmlpDecAny2 (OSCTXT *pctxt, OSUTF8CHAR **pvalue)
 This version of the rtXmlpDecAny function returns the string in a mutable buffer. More...
 
EXTERNXML int rtXmlpDecAnyAttrStr (OSCTXT *pctxt, const OSUTF8CHAR **ppAttrStr, OSSIZE attrIndex)
 This function decodes an any attribute string. More...
 
EXTERNXML 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). More...
 
EXTERNXML 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. More...
 
EXTERNXML int rtXmlpDecBase64Str64 (OSCTXT *pctxt, OSOCTET *pvalue, OSSIZE *pnocts, OSSIZE bufsize)
 This function is identical to rtXmlpDecBase64Str except that it supports 64-bit integer lengths on 64-bit systems. More...
 
EXTERNXML int rtXmlpDecBigInt (OSCTXT *pctxt, const OSUTF8CHAR **pvalue)
 This function will decode a variable of the XSD integer type. More...
 
EXTERNXML int rtXmlpDecBitString (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnbits, OSUINT32 bufsize)
 This function decodes a bit string value. More...
 
EXTERNXML int rtXmlpDecBitString64 (OSCTXT *pctxt, OSOCTET *pvalue, OSSIZE *pnbits, OSSIZE bufsize)
 This function is identical to rtXmlpDecBitString except that it supports lengths up to 64-bits in size on 64-bit machines. More...
 
EXTERNXML int rtXmlpDecBitStringExt (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnbits, OSOCTET **ppextdata, OSUINT32 bufsize)
 This function decodes a bit string value. More...
 
EXTERNXML int rtXmlpDecBitStringExt64 (OSCTXT *pctxt, OSOCTET *pvalue, OSSIZE *pnbits, OSOCTET **ppextdata, OSSIZE bufsize)
 This function is identical to rtXmlpDecBitStringExt except that it supports lengths up to 64-bits in size on 64-bit machines. More...
 
EXTERNXML int rtXmlpDecBool (OSCTXT *pctxt, OSBOOL *pvalue)
 This function decodes a variable of the boolean type. More...
 
EXTERNXML int rtXmlpDecDate (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'date' type. More...
 
EXTERNXML int rtXmlpDecDateTime (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'dateTime' type. More...
 
EXTERNXML int rtXmlpDecDecimal (OSCTXT *pctxt, OSREAL *pvalue, int totalDigits, int fractionDigits)
 This function decodes the contents of a decimal data type. More...
 
EXTERNXML int rtXmlpDecDouble (OSCTXT *pctxt, OSREAL *pvalue)
 This function decodes the contents of a float or double data type. More...
 
EXTERNXML int rtXmlpDecDoubleExt (OSCTXT *pctxt, OSUINT8 flags, OSREAL *pvalue)
 This function decodes the contents of a float or double data type. More...
 
EXTERNXML int rtXmlpDecDynBase64Str (OSCTXT *pctxt, OSDynOctStr *pvalue)
 This function decodes a contents of a Base64-encode binary string. More...
 
EXTERNXML int rtXmlpDecDynBase64Str64 (OSCTXT *pctxt, OSDynOctStr64 *pvalue)
 This function is identical to rtXmlpDecDynBase64Str except that it supports 64-bit integer lengths on 64-bit systems. More...
 
EXTERNXML int rtXmlpDecDynBitString (OSCTXT *pctxt, OSDynOctStr *pvalue)
 This function decodes a bit string value. More...
 
EXTERNXML int rtXmlpDecDynHexStr (OSCTXT *pctxt, OSDynOctStr *pvalue)
 This function decodes a contents of a hexBinary string. More...
 
EXTERNXML int rtXmlpDecDynHexStr64 (OSCTXT *pctxt, OSDynOctStr64 *pvalue)
 This function is identical to the rtXmlpDecDynHexStr except that it supports lengths up to 64 bits in size on 64-bit systems. More...
 
EXTERNXML int rtXmlpDecDynUnicodeStr (OSCTXT *pctxt, const OSUNICHAR **ppdata, OSSIZE *pnchars)
 This function decodes a Unicode string data type. More...
 
EXTERNXML int rtXmlpDecDynUTF8Str (OSCTXT *pctxt, const OSUTF8CHAR **outdata)
 This function decodes the contents of a UTF-8 string data type. More...
 
EXTERNXML int rtXmlpDecUTF8Str (OSCTXT *pctxt, OSUTF8CHAR *out, OSSIZE max_len)
 This function decodes the contents of a UTF-8 string data type. More...
 
EXTERNXML int rtXmlpDecGDay (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gDay' type. More...
 
EXTERNXML int rtXmlpDecGMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gMonth' type. More...
 
EXTERNXML int rtXmlpDecGMonthDay (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gMonthDay' type. More...
 
EXTERNXML int rtXmlpDecGYear (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gYear' type. More...
 
EXTERNXML int rtXmlpDecGYearMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'gYearMonth' type. More...
 
EXTERNXML int rtXmlpDecHexStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, OSSIZE bufsize)
 This function decodes the contents of a hexBinary string into a static memory structure. More...
 
EXTERNXML int rtXmlpDecHexStr64 (OSCTXT *pctxt, OSOCTET *pvalue, OSSIZE *pnocts, OSSIZE bufsize)
 This function is identical to rtXmlpDecHexStr except that it supports lengths up to 64-bits in size on 64-bit machines. More...
 
EXTERNXML int rtXmlpDecInt (OSCTXT *pctxt, OSINT32 *pvalue)
 This function decodes the contents of a 32-bit integer data type. More...
 
EXTERNXML int rtXmlpDecInt8 (OSCTXT *pctxt, OSINT8 *pvalue)
 This function decodes the contents of an 8-bit integer data type (i.e. More...
 
EXTERNXML int rtXmlpDecInt16 (OSCTXT *pctxt, OSINT16 *pvalue)
 This function decodes the contents of a 16-bit integer data type. More...
 
EXTERNXML int rtXmlpDecInt64 (OSCTXT *pctxt, OSINT64 *pvalue)
 This function decodes the contents of a 64-bit integer data type. More...
 
EXTERNXML int rtXmlpDecNamedBits (OSCTXT *pctxt, const OSBitMapItem *pBitMap, OSOCTET *pvalue, OSUINT32 *pnbits, OSUINT32 bufsize)
 This function decodes the contents of a named bit field. More...
 
EXTERNXML int rtXmlpDecNamedBits64 (OSCTXT *pctxt, const OSBitMapItem *pBitMap, OSOCTET *pvalue, OSSIZE *pnbits, OSSIZE bufsize)
 This function decodes the contents of a named bit field. More...
 
EXTERNXML 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. More...
 
EXTERNXML int rtXmlpDecTime (OSCTXT *pctxt, OSXSDDateTime *pvalue)
 This function decodes a variable of the XSD 'time' type. More...
 
EXTERNXML int rtXmlpDecUInt (OSCTXT *pctxt, OSUINT32 *pvalue)
 This function decodes the contents of an unsigned 32-bit integer data type. More...
 
EXTERNXML int rtXmlpDecUInt8 (OSCTXT *pctxt, OSOCTET *pvalue)
 This function decodes the contents of an unsigned 8-bit integer data type (i.e. More...
 
EXTERNXML int rtXmlpDecUInt16 (OSCTXT *pctxt, OSUINT16 *pvalue)
 This function decodes the contents of an unsigned 16-bit integer data type. More...
 
EXTERNXML int rtXmlpDecUInt64 (OSCTXT *pctxt, OSUINT64 *pvalue)
 This function decodes the contents of an unsigned 64-bit integer data type. More...
 
EXTERNXML int rtXmlpDecXmlStr (OSCTXT *pctxt, OSXMLSTRING *outdata)
 This function decodes the contents of an XML string data type. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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). More...
 
EXTERNXML int rtXmlpGetAttributeID (const OSXMLStrFragment *attrName, OSINT16 nsidx, OSSIZE nAttr, const OSXMLAttrDescr attrNames[], OSUINT32 attrPresent[])
 This function finds an attribute in the descriptor table. More...
 
EXTERNXML int rtXmlpGetNextElem (OSCTXT *pctxt, OSXMLElemDescr *pElem, OSINT32 level)
 This function parse the next element start tag. More...
 
EXTERNXML 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. More...
 
EXTERNXML int rtXmlpMarkLastEventActive (OSCTXT *pctxt)
 This function marks current tag as unprocessed. More...
 
EXTERNXML int rtXmlpMatchStartTag (OSCTXT *pctxt, const OSUTF8CHAR *elemLocalName, OSINT16 nsidx)
 This function parses the next start tag that matches with given name. More...
 
EXTERNXML int rtXmlpMatchEndTag (OSCTXT *pctxt, OSINT32 level)
 This function parse next end tag that matches with given name. More...
 
EXTERNXML OSBOOL rtXmlpHasAttributes (OSCTXT *pctxt)
 This function checks accessibility of attributes. More...
 
EXTERNXML int rtXmlpGetAttributeCount (OSCTXT *pctxt)
 This function returns number of attributes in last processed start tag. More...
 
EXTERNXML int rtXmlpSelectAttribute (OSCTXT *pctxt, OSXMLNameFragments *pAttr, OSINT16 *nsidx, OSSIZE attrIndex)
 This function selects attribute to decode. More...
 
EXTERNXML OSINT32 rtXmlpGetCurrentLevel (OSCTXT *pctxt)
 This function returns current nesting level. More...
 
EXTERNXML void rtXmlpSetWhiteSpaceMode (OSCTXT *pctxt, OSXMLWhiteSpaceMode whiteSpaceMode)
 Sets the whitespace treatment mode. More...
 
EXTERNXML OSBOOL rtXmlpSetMixedContentMode (OSCTXT *pctxt, OSBOOL mixedContentMode)
 Sets mixed content mode. More...
 
EXTERNXML void rtXmlpSetListMode (OSCTXT *pctxt)
 Sets list mode. More...
 
EXTERNXML OSBOOL rtXmlpListHasItem (OSCTXT *pctxt)
 Check for end of decoded token list. More...
 
EXTERNXML void rtXmlpCountListItems (OSCTXT *pctxt, OSSIZE *itemCnt)
 Count tokens in list. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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. More...
 
EXTERNXML void rtXmlpSetNamespaceTable (OSCTXT *pctxt, const OSUTF8CHAR *namespaceTable[], OSSIZE nmNamespaces)
 Sets user namespace table. More...
 
EXTERNXML int rtXmlpCreateReader (OSCTXT *pctxt)
 Creates pull parser reader structure within the context. More...
 
EXTERNXML void rtXmlpHideAttributes (OSCTXT *pctxt)
 Disable access to attributes. More...
 
EXTERNXML OSBOOL rtXmlpNeedDecodeAttributes (OSCTXT *pctxt)
 This function checks if attributes were previously decoded. More...
 
EXTERNXML void rtXmlpMarkPos (OSCTXT *pctxt)
 Save current decode position. More...
 
EXTERNXML void rtXmlpRewindToMarkedPos (OSCTXT *pctxt)
 Rewind to saved decode position. More...
 
EXTERNXML void rtXmlpResetMarkedPos (OSCTXT *pctxt)
 Reset saved decode position. More...
 
EXTERNXML 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). More...
 
EXTERNXML int rtXmlpGetXmlnsAttrs (OSCTXT *pctxt, OSRTDList *pNSAttrs)
 This function decodes namespace attributes from start tag and adds them to the given list. More...
 
EXTERNXML int rtXmlpDecXSIAttrs (OSCTXT *pctxt)
 This function decodes XSI (XML Schema Instance) that may be present in any arbitrary XML element within a document. More...
 
EXTERNXML OSBOOL rtXmlpIsEmptyElement (OSCTXT *pctxt)
 Check element content: empty or not. More...
 
EXTERNXML int rtXmlEncAttrC14N (OSCTXT *pctxt)
 This function used only in C14 mode. More...
 
EXTERNXML struct OSXMLReader * rtXmlpGetReader (OSCTXT *pctxt)
 This function fetches the XML reader structure from the context for use in low-level pull parser calls. More...
 
EXTERNXML OSBOOL rtXmlpIsLastEventDone (OSCTXT *pctxt)
 Check processing status of current tag. More...
 
EXTERNXML 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. More...
 
EXTERNXML 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. More...
 
EXTERNXML void rtXmlpForceDecodeAsGroup (OSCTXT *pctxt)
 Disable skipping of unknown elements in optional sequence tail. More...
 
EXTERNXML OSBOOL rtXmlpIsDecodeAsGroup (OSCTXT *pctxt)
 This function checks if "decode as group" mode was forced. More...
 
EXTERNXML OSBOOL rtXmlpIsUTF8Encoding (OSCTXT *pctxt)
 This function checks if the encoding specified in XML header is UTF-8. More...
 
EXTERNXML int rtXmlpReadBytes (OSCTXT *pctxt, OSOCTET *pbuf, OSSIZE nbytes)
 This function reads the specified number of bytes directly from the underlying XML parser stream. More...
 

Detailed Description

Function Documentation

◆ rtXmlEncAttrC14N()

EXTERNXML int rtXmlEncAttrC14N ( OSCTXT *  pctxt)

This function used only in C14 mode.

It provide atributes sorting.

Parameters
pctxtPointer to context block structure.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpCountListItems()

EXTERNXML void rtXmlpCountListItems ( OSCTXT *  pctxt,
OSSIZE *  itemCnt 
)

Count tokens in list.

Parameters
pctxtPointer to context block structure.
itemCntPointer to number of elements in list.
Returns
Token number. For element content function check accessed part of content only. Returned value may be below then real token number.

◆ rtXmlpCreateReader()

EXTERNXML int rtXmlpCreateReader ( OSCTXT *  pctxt)

Creates pull parser reader structure within the context.

Parameters
pctxtPointer to context block structure.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecAny()

EXTERNXML 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).

The decoded XML fragment is returned as a string in the form as it appears in the document. Memory is allocated for the string using the rtxMemAlloc function.

Parameters
pctxtPointer to context block structure.
pvaluePointer to UTF8 character string pointer to receive decoded XML fragment. Memory is allocated for the string using the run-time memory manager.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecAny2()

EXTERNXML int rtXmlpDecAny2 ( OSCTXT *  pctxt,
OSUTF8CHAR **  pvalue 
)

This version of the rtXmlpDecAny function returns the string in a mutable buffer.

Parameters
pctxtPointer to context block structure.
pvaluePointer to UTF8 character string pointer to receive decoded XML fragment. Memory is allocated for the string using the run-time memory manager.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecAnyAttrStr()

EXTERNXML int rtXmlpDecAnyAttrStr ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppAttrStr,
OSSIZE  attrIndex 
)

This function decodes an any attribute string.

The full attribute string (name="value") is decoded and returned on the string output argument. Memory is allocated for the string using the rtxMemAlloc function.

Parameters
pctxtPointer to context block structure.
ppAttrStrPointer to UTF8 character string pointer to receive decoded attribute string. Memory is allocated for the string using the run-time memory manager.
attrIndexIndex of attribute.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecAnyElem()

EXTERNXML 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).

The decoded XML fragment is returned as a string in the form as it appears in the document. Memory is allocated for the string using the rtxMemAlloc function. The difference between this function and rtXmlpDecAny is that this function preserves the full encoded XML fragment including the start and end elements tags and attributes. rtXmlpDecAny decodes the contents within the start and end tags.

Parameters
pctxtPointer to context block structure.
pvaluePointer to UTF8 character string pointer to receive decoded XML fragment. Memory is allocated for the string using the run-time memory manager.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecBase64Str()

EXTERNXML 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.

The octet string must be Base64 encoded. This function call is used to decode a sized base64Binary string production. Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a variable to receive the decoded bit string. This is assumed to be a static array large enough to hold the number of octets specified in the bufsize input parameter.
pnoctsA pointer to an integer value to receive the decoded number of octets.
bufsizeThe size (in octets) of the sized octet string. An error will occur if the number of octets in the decoded string is larger than this value.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecBase64Str64()

EXTERNXML int rtXmlpDecBase64Str64 ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSSIZE *  pnocts,
OSSIZE  bufsize 
)

This function is identical to rtXmlpDecBase64Str except that it supports 64-bit integer lengths on 64-bit systems.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a variable to receive the decoded bit string. This is assumed to be a static array large enough to hold the number of octets specified in the bufsize input parameter.
pnoctsA pointer to an integer value to receive the decoded number of octets.
bufsizeThe size (in octets) of the sized octet string. An error will occur if the number of octets in the decoded string is larger than this value.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecBigInt()

EXTERNXML int rtXmlpDecBigInt ( OSCTXT *  pctxt,
const OSUTF8CHAR **  pvalue 
)

This function will decode a variable of the XSD integer type.

In this case, the integer is assumed to be of a larger size than can fit in a C or C++ long type (normally 32 or 64 bits). For example, parameters used to calculate security values are typically larger than these sizes.

These variables are stored in character string constant variables. The radix should be 10. If it is necessary to convert to another radix, then use rtxBigIntSetStr or rtxBigIntToString functions. Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to a pointer to receive decoded UTF-8 string. Dynamic memory is allocated for the variable using the rtMemAlloc function. The decoded variable is represented as a string starting with appropriate prefix.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecBitString()

EXTERNXML int rtXmlpDecBitString ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSUINT32 *  pnbits,
OSUINT32  bufsize 
)

This function decodes a bit string value.

The string consists of a series of '1' and '0' characters. This is the static version in which the user provides a pre-allocated memory buffer to receive the decoded data. One byte in a memory buffer can hold 8 characters of encoded data. Bits are stored from MSB to LSB order.

Parameters
pctxtPointer to context block structure.
pvaluePointer to a variable to receive the decoded boolean value.
pnbitsPointer to hold decoded number of bits.
bufsizeSize of buffer passed in pvalue argument.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecBitString64()

EXTERNXML int rtXmlpDecBitString64 ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSSIZE *  pnbits,
OSSIZE  bufsize 
)

This function is identical to rtXmlpDecBitString except that it supports lengths up to 64-bits in size on 64-bit machines.

This function decodes a bit string value. The string consists of a series of '1' and '0' characters. This is the static version in which the user provides a pre-allocated memory buffer to receive the decoded data. One byte in a memory buffer can hold 8 characters of encoded data. Bits are stored from MSB to LSB order.

Parameters
pctxtPointer to context block structure.
pvaluePointer to a variable to receive the decoded boolean value.
pnbitsPointer to hold decoded number of bits.
bufsizeSize of buffer passed in pvalue argument.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.
See also
rtXmlpDecBitString

◆ rtXmlpDecBitStringExt()

EXTERNXML int rtXmlpDecBitStringExt ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSUINT32 *  pnbits,
OSOCTET **  ppextdata,
OSUINT32  bufsize 
)

This function decodes a bit string value.

The string consists of a series of '1' and '0' characters. This is the static version in which the user provides a pre-allocated memory buffer to receive the decoded data. One byte in a memory buffer can hold 8 characters of encoded data. Bits are stored from MSB to LSB order. This version supports BIT STRINGs with the extdata member present.

Parameters
pctxtPointer to context block structure.
pvaluePointer to a variable to receive the decoded boolean value.
pnbitsPointer to hold decoded number of bits.
ppextdataPointer to byte array containing extension data.
bufsizeSize of buffer passed in pvalue argument.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecBitStringExt64()

EXTERNXML int rtXmlpDecBitStringExt64 ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSSIZE *  pnbits,
OSOCTET **  ppextdata,
OSSIZE  bufsize 
)

This function is identical to rtXmlpDecBitStringExt except that it supports lengths up to 64-bits in size on 64-bit machines.

This function decodes a bit string value. The string consists of a series of '1' and '0' characters. This is the static version in which the user provides a pre-allocated memory buffer to receive the decoded data. One byte in a memory buffer can hold 8 characters of encoded data. Bits are stored from MSB to LSB order. This version supports BIT STRINGs with the extdata member present.

Parameters
pctxtPointer to context block structure.
pvaluePointer to a variable to receive the decoded boolean value.
pnbitsPointer to hold decoded number of bits.
ppextdataPointer to byte array containing extension data.
bufsizeSize of buffer passed in pvalue argument.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.
See also
rtXmlpDecBitStringExt

◆ rtXmlpDecBool()

EXTERNXML int rtXmlpDecBool ( OSCTXT *  pctxt,
OSBOOL *  pvalue 
)

This function decodes a variable of the boolean type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to a variable to receive the decoded boolean value.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDate()

EXTERNXML int rtXmlpDecDate ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'date' type.

Input is expected to be a string of characters returned by an XML pull parser. The string should have CCYY-MM-DD format.

Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDateTime()

EXTERNXML int rtXmlpDecDateTime ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'dateTime' type.

Input is expected to be a string of characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDecimal()

EXTERNXML int rtXmlpDecDecimal ( OSCTXT *  pctxt,
OSREAL *  pvalue,
int  totalDigits,
int  fractionDigits 
)

This function decodes the contents of a decimal data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to 64-bit double value to receive decoded result.
totalDigitsNumber of total digits in the decimal number from XSD totalDigits facet value. Argument should be set to -1 if facet not given.
fractionDigitsNumber of fraction digits in the decimal number from XSD fractionDigits facet value. Argument should be set to -1 if facet not given.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDouble()

EXTERNXML int rtXmlpDecDouble ( OSCTXT *  pctxt,
OSREAL *  pvalue 
)

This function decodes the contents of a float or double data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to 64-bit double value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDoubleExt()

EXTERNXML int rtXmlpDecDoubleExt ( OSCTXT *  pctxt,
OSUINT8  flags,
OSREAL *  pvalue 
)

This function decodes the contents of a float or double data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
flagsSpecifies alternatives allowed in the lexical value. See OSXMLREALENC* constants. bit 0 (rightmost) set: recognize INF, -INF, NaN text values bit 1 set: recognize leading '+' on normal reals bit 2 set: recognize leading '+' on INF bit 3 set: recognize leading zeros in exponent bit 4 set: recognize exponents
pvaluePointer to 64-bit double value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDynBase64Str()

EXTERNXML int rtXmlpDecDynBase64Str ( OSCTXT *  pctxt,
OSDynOctStr *  pvalue 
)

This function decodes a contents of a Base64-encode binary string.

The octet string must be Base64 encoded. This function will allocate dynamic memory to store the decoded result. Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a dynamic octet string structure to receive the decoded octet string. Dynamic memory is allocated for the string using the ::rtxMemAlloc function.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDynBase64Str64()

EXTERNXML int rtXmlpDecDynBase64Str64 ( OSCTXT *  pctxt,
OSDynOctStr64 *  pvalue 
)

This function is identical to rtXmlpDecDynBase64Str except that it supports 64-bit integer lengths on 64-bit systems.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a dynamic octet string structure to receive the decoded octet string. Dynamic memory is allocated for the string using the ::rtxMemAlloc function.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDynBitString()

EXTERNXML int rtXmlpDecDynBitString ( OSCTXT *  pctxt,
OSDynOctStr *  pvalue 
)

This function decodes a bit string value.

The string consists of a series of '1' and '0' characters. This is the dynamic version in which memory is allocated for the returned binary string variable. Bits are stored from MSB to LSB order.

Parameters
pctxtPointer to context block structure.
pvaluePointer to a variable to receive the decoded boolean value.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDynHexStr()

EXTERNXML int rtXmlpDecDynHexStr ( OSCTXT *  pctxt,
OSDynOctStr *  pvalue 
)

This function decodes a contents of a hexBinary string.

This function will allocate dynamic memory to store the decoded result. Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a dynamic octet string structure to receive the decoded octet string. Dynamic memory is allocated to hold the string using the ::rtxMemAlloc function.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDynHexStr64()

EXTERNXML int rtXmlpDecDynHexStr64 ( OSCTXT *  pctxt,
OSDynOctStr64 *  pvalue 
)

This function is identical to the rtXmlpDecDynHexStr except that it supports lengths up to 64 bits in size on 64-bit systems.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a dynamic octet string structure to receive the decoded octet string. Dynamic memory is allocated to hold the string using the ::rtxMemAlloc function.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDynUnicodeStr()

EXTERNXML int rtXmlpDecDynUnicodeStr ( OSCTXT *  pctxt,
const OSUNICHAR **  ppdata,
OSSIZE *  pnchars 
)

This function decodes a Unicode string data type.

The input is assumed to be in UTF-8 format. This function reads each character and converts it into its Unicode equivalent.

Parameters
pctxtPointer to context block structure.
ppdataPointer to Unicode character string. A Unicode character string is represented as an array of unsigned 16-bit integers in C. Memory is allocated for the string using the run-time memory manager.
pncharsPointer to integer variables to receive the number of characters in the string.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecDynUTF8Str()

EXTERNXML int rtXmlpDecDynUTF8Str ( OSCTXT *  pctxt,
const OSUTF8CHAR **  outdata 
)

This function decodes the contents of a UTF-8 string data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
outdataPointer to a pointer to receive decoded UTF-8 string. Memory is allocated for this string using the run-time memory manager.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecGDay()

EXTERNXML int rtXmlpDecGDay ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'gDay' type.

Input is expected to be a string of characters returned by an XML pull parser. The string should have —DD[-+hh:mm|Z] format.

Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecGMonth()

EXTERNXML int rtXmlpDecGMonth ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'gMonth' type.

Input is expected to be a string of characters returned by an XML pull parser. The string should have –MM[-+hh:mm|Z] format.

Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecGMonthDay()

EXTERNXML int rtXmlpDecGMonthDay ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'gMonthDay' type.

Input is expected to be a string of characters returned by an XML pull parser. The string should have –MM-DD[-+hh:mm|Z] format.

Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecGYear()

EXTERNXML int rtXmlpDecGYear ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'gYear' type.

Input is expected to be a string of characters returned by an XML pull parser. The string should have CCYY[-+hh:mm|Z] format.

Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecGYearMonth()

EXTERNXML int rtXmlpDecGYearMonth ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'gYearMonth' type.

Input is expected to be a string of characters returned by an XML pull parser. The string should have CCYY-MM[-+hh:mm|Z] format.

Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecHexStr()

EXTERNXML int rtXmlpDecHexStr ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSUINT32 *  pnocts,
OSSIZE  bufsize 
)

This function decodes the contents of a hexBinary string into a static memory structure.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a variable to receive the decoded bit string. This is assumed to be a static array large enough to hold the number of octets specified in the bufsize input parameter.
pnoctsA pointer to an integer value to receive the decoded number of octets.
bufsizeThe size (in octets) of the sized octet string. An error will occur if the number of octets in the decoded string is larger than this value.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecHexStr64()

EXTERNXML int rtXmlpDecHexStr64 ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSSIZE *  pnocts,
OSSIZE  bufsize 
)

This function is identical to rtXmlpDecHexStr except that it supports lengths up to 64-bits in size on 64-bit machines.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
pvalueA pointer to a variable to receive the decoded bit string. This is assumed to be a static array large enough to hold the number of octets specified in the bufsize input parameter.
pnoctsA pointer to an integer value to receive the decoded number of octets.
bufsizeThe size (in octets) of the sized octet string. An error will occur if the number of octets in the decoded string is larger than this value.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.
See also
rtXmlpDecHexStr

◆ rtXmlpDecInt()

EXTERNXML int rtXmlpDecInt ( OSCTXT *  pctxt,
OSINT32 *  pvalue 
)

This function decodes the contents of a 32-bit integer data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to 32-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecInt16()

EXTERNXML int rtXmlpDecInt16 ( OSCTXT *  pctxt,
OSINT16 *  pvalue 
)

This function decodes the contents of a 16-bit integer data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to 16-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecInt64()

EXTERNXML int rtXmlpDecInt64 ( OSCTXT *  pctxt,
OSINT64 *  pvalue 
)

This function decodes the contents of a 64-bit integer data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to 64-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecInt8()

EXTERNXML int rtXmlpDecInt8 ( OSCTXT *  pctxt,
OSINT8 *  pvalue 
)

This function decodes the contents of an 8-bit integer data type (i.e.

a signed byte type in the range of -128 to 127). Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to 8-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecNamedBits()

EXTERNXML int rtXmlpDecNamedBits ( OSCTXT *  pctxt,
const OSBitMapItem *  pBitMap,
OSOCTET *  pvalue,
OSUINT32 *  pnbits,
OSUINT32  bufsize 
)

This function decodes the contents of a named bit field.

This is a space-separated list of token values in which each token corresponds to a bit field in a bit map.

Parameters
pctxtPointer to context block structure.
pBitMapPointer to bit map structure that defined token to bit mappings.
pvaluePointer to buffer to recieve decoded bit map.
pnbitsNumber of bits in decoded bit map.
bufsizeSize of buffer passed in to received decoded bit values.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecNamedBits64()

EXTERNXML int rtXmlpDecNamedBits64 ( OSCTXT *  pctxt,
const OSBitMapItem *  pBitMap,
OSOCTET *  pvalue,
OSSIZE *  pnbits,
OSSIZE  bufsize 
)

This function decodes the contents of a named bit field.

This is a space-separated list of token values in which each token corresponds to a bit field in a bit map.

Parameters
pctxtPointer to context block structure.
pBitMapPointer to bit map structure that defined token to bit mappings.
pvaluePointer to buffer to recieve decoded bit map.
pnbitsNumber of bits in decoded bit map.
bufsizeSize of buffer passed in to received decoded bit values.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecStrList()

EXTERNXML 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.

Memory is allocated for the list nodes and token values using the rtx memory management functions.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
plistA pointer to a linked list structure to which the parsed token values will be added.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecTime()

EXTERNXML int rtXmlpDecTime ( OSCTXT *  pctxt,
OSXSDDateTime *  pvalue 
)

This function decodes a variable of the XSD 'time' type.

Input is expected to be a string of characters returned by an XML pull parser. The string should have one of following formats:

               (1) hh-mm-ss.ss  used if tz_flag = false
               (2) hh-mm-ss.ssZ used if tz_flag = false and tzo = 0
               (3) hh-mm-ss.ss+HH:MM if tz_flag = false and tzo > 0
               (4) hh-mm-ss.ss-HH:MM-HH:MM
                                     if tz_flag = false and tzo < 0
Parameters
pctxtPointer to context block structure.
pvalueOSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecUInt()

EXTERNXML int rtXmlpDecUInt ( OSCTXT *  pctxt,
OSUINT32 *  pvalue 
)

This function decodes the contents of an unsigned 32-bit integer data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to unsigned 32-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecUInt16()

EXTERNXML int rtXmlpDecUInt16 ( OSCTXT *  pctxt,
OSUINT16 *  pvalue 
)

This function decodes the contents of an unsigned 16-bit integer data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to unsigned 16-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecUInt64()

EXTERNXML int rtXmlpDecUInt64 ( OSCTXT *  pctxt,
OSUINT64 *  pvalue 
)

This function decodes the contents of an unsigned 64-bit integer data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to unsigned 64-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecUInt8()

EXTERNXML int rtXmlpDecUInt8 ( OSCTXT *  pctxt,
OSOCTET *  pvalue 
)

This function decodes the contents of an unsigned 8-bit integer data type (i.e.

a signed byte type in the range of 0 to 255). Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
pvaluePointer to unsigned 8-bit integer value to receive decoded result.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecUTF8Str()

EXTERNXML int rtXmlpDecUTF8Str ( OSCTXT *  pctxt,
OSUTF8CHAR *  out,
OSSIZE  max_len 
)

This function decodes the contents of a UTF-8 string data type.

Input is expected to be a string of OSUTF8CHAR characters returned by an XML pull parser.

Parameters
pctxtPointer to context block structure.
outPointer to an array of OSUTF8CHAR to receive decoded UTF-8 string.
max_lenLength of out array.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecXmlStr()

EXTERNXML int rtXmlpDecXmlStr ( OSCTXT *  pctxt,
OSXMLSTRING *  outdata 
)

This function decodes the contents of an XML string data type.

This type contains a pointer to a UTF-8 characer string plus flags that can be set to alter the encoding of the string (for example, the cdata flag allows the string to be encoded in a CDATA section). Input is expected to be a string of UTF-8 characters returned by an XML parser.

Parameters
pctxtPointer to context block structure.
outdataPointer to an XML string structure to receive the decoded string. Memory is allocated for the string using the run-time memory manager.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecXmlStrList()

EXTERNXML 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.

Memory is allocated for the list nodes and token values using the rtx memory management functions. List contains OSXMLSTRING structures.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
plistA pointer to a linked list structure to which the parsed token values will be added.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecXSIAttr()

EXTERNXML 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.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
attrNameA pointer to a structure holding various parts of an attribute name. The parts are in the form of string fragments meaning they are not null terminated. The user must be careful to use the value and length when working with them.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecXSIAttrs()

EXTERNXML int rtXmlpDecXSIAttrs ( OSCTXT *  pctxt)

This function decodes XSI (XML Schema Instance) that may be present in any arbitrary XML element within a document.

Parameters
pctxtPointer to context block structure.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpDecXSITypeAttr()

EXTERNXML 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).

Prior to calling this function, use rtXmlpSelectAttribute to select the attribute. After calling this function, if you want to read the same attribute again, you will need to call rtXmlpSelectAttribute again.

Parameters
pctxtA pointer to a context structure. This provides a storage area for the function to store all working variables that must be maintained between function calls.
attrNameA pointer to a structure holding various parts of an attribute name. The parts are in the form of string fragments meaning they are not null terminated. The user must be careful to use the value and length when working with them.
ppAttrValueA pointer to a pointer to a UTF8 character string to received the decoded XSI type name.
Returns
Completion status of operation:
  • 0 = success,
  • 1 = OK, but attrName was not xsi:type (i.e. no attribute match)
  • negative return value is error.

◆ rtXmlpForceDecodeAsGroup()

EXTERNXML void rtXmlpForceDecodeAsGroup ( OSCTXT *  pctxt)

Disable skipping of unknown elements in optional sequence tail.

Function used in outer types to break decode on first unknown element after decoding mandatory sequence part.

Parameters
pctxtPointer to context block structure.

◆ rtXmlpGetAttributeCount()

EXTERNXML int rtXmlpGetAttributeCount ( OSCTXT *  pctxt)

This function returns number of attributes in last processed start tag.

Parameters
pctxtPointer to context block structure.
Returns
Completion status of operation:
  • zero or positive value is atributes number,
  • negative return value is error.

◆ rtXmlpGetAttributeID()

EXTERNXML int rtXmlpGetAttributeID ( const OSXMLStrFragment attrName,
OSINT16  nsidx,
OSSIZE  nAttr,
const OSXMLAttrDescr  attrNames[],
OSUINT32  attrPresent[] 
)

This function finds an attribute in the descriptor table.

Parameters
attrNameA pointer to a structure holding various parts of an attribute name. The parts are in the form of string fragments meaning they are not null terminated. The user must be careful to use the value and length when working with them.
nsidxNamespace index:
  • 0 = attribute is unqualified,
  • positive value is user namespace from generated namespace table,
  • negative value is predefined namespace like XSD instance and ect.
nAttrNumber of descriptors in table.
attrNamesAttributes descriptor table.
attrPresentBit array to mark already decoded attributes. It is used to identify duplicate attributes.
Returns
Completion status of operation:
  • positive or zero return value is attribute index in descriptor table,
  • negative return value is error.

◆ rtXmlpGetCurrentLevel()

EXTERNXML OSINT32 rtXmlpGetCurrentLevel ( OSCTXT *  pctxt)

This function returns current nesting level.

Parameters
pctxtPointer to context block structure.
Returns
Current nesting level.

◆ rtXmlpGetNextAllElemID()

EXTERNXML 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.

It used for decode "all" content model in strict mode.

Parameters
pctxtPointer to context block structure.
tabElements descriptor table.
nrowsNumber of descriptors in table.
pOrderPointer to array to receive elements order.
nOrderLast element's index in order array.
maxOrderSize of order array.
anyIDIdentifier of xsd:any element.
Returns
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.

◆ rtXmlpGetNextAllElemID16()

EXTERNXML 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.

It used for decode "all" content model in strict mode. This variant used when xsd:all has above 256 elements.

Parameters
pctxtPointer to context block structure.
tabElements descriptor table.
nrowsNumber of descriptors in table.
pOrderPointer to array to receive elements order.
nOrderLast element's index in order array.
maxOrderSize of order array.
anyIDIdentifier of xsd:any element.
Returns
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.

◆ rtXmlpGetNextAllElemID32()

EXTERNXML 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.

It used for decode "all" content model in strict mode.

Parameters
pctxtPointer to context block structure.
tabElements descriptor table.
nrowsNumber of descriptors in table.
pOrderPointer to array to receive elements order.
nOrderLast element's index in order array.
maxOrderSize of order array.
anyIDIdentifier of xsd:any element.
Returns
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.

◆ rtXmlpGetNextElem()

EXTERNXML int rtXmlpGetNextElem ( OSCTXT *  pctxt,
OSXMLElemDescr pElem,
OSINT32  level 
)

This function parse the next element start tag.

Parameters
pctxtPointer to context block structure.
pElemPointer to a structure to receive the decoded element descriptor.
levelNesting level of parsed start tag. When value equal -1 parsed next start tag.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpGetNextElemID()

EXTERNXML 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.

If this reaches the closing tag for the current level, it returns XML_OK_EOB. If this encounters an unexpected element and !continueParse, it returns RTERR_UNEXPELEM (without logging it).

Parameters
pctxtPointer to context block structure.
tabElements descriptor table.
nrowsNumber of descriptors in table.
levelNesting level of parsed start tag. When value equal -1 function parse next start tag.
continueParseWhen value equals TRUE function skips unrecognized elements; skipped elements are logged, but an error is not returned.
Returns
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.

◆ rtXmlpGetNextSeqElemID()

EXTERNXML 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.

It is used to decode sequences in strict mode.

Handling of unexpected elements:

  • If the current decode group includes an any case, unexpected elements will be matched against it (the any case id will be returned).
  • Otherwise, if groupMode is true, and the element identified by lastMandatoryID has been reached, XML_OK_EOB is returned. The unexpected element may belong to something following the elements in tab.
  • If neither of the above applies, unknown elements will be logged and skipped over, with this method continuing as if the unexpected element were not present. Handling of the case of reaching closing tag for current level:
  • If the last mandatory element is reached, return XML_OK_EOB.
  • Otherwise, log and return XML_E_ELEMSMISRQ.

This function is equivalent to: rtXmlpGetNextSeqElemID2(pctxt, tab, pGroup, curID, lastMandatoryID, groupMode, FALSE);

Parameters
pctxtPointer to context block structure.
tabElements descriptor table.
pGroupDecode groups table.
curIDCurrent decode group.
lastMandatoryIDIdentifier of last mandatory element.
groupModeThis parameter must be setted to TRUE when decoding groups or base types.
Returns
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.

◆ rtXmlpGetNextSeqElemID2()

EXTERNXML 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.

It is used to decode sequences in strict mode.

Parameters
pctxtPointer to context block structure.
tabElements descriptor table.
pGroupDecode groups table.
groupsNumber of groups in groups table. If checkRepeat is FALSE, you can pass 0 for this if the value is unknown.
curIDCurrent decode group.
lastMandatoryIDIdentifier of last mandatory element.
groupModeThis parameter must be setted to TRUE when decode groups or base types.
checkRepeatIf true, this method is being called to check for a repeat of curID. In this case, we do not treat curID as being required. Otherwise, curID is required if curId <= lastMandatoryID.
Returns
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.

◆ rtXmlpGetNextSeqElemIDExt()

EXTERNXML 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.

It allows required extension elements to be absent, except that when an extension group is present, all required extension elements in that group must be present. It otherwise behaves the same as rtXmlpGetNextSeqElemID.

Parameters
pctxtPointer to context block structure.
tabElements descriptor table.
pGroupDecode groups table.
extRequiredextRequired[i] corresponds to pGroup[i]. This is TRUE if and only if the decode group ends with a non-optional, non-default extension element that must be present in the encoding (because it is inside an extension group for which some element has already been decoded).
postExtRootIDThis is the group id corresponding to the decode group that begins with the first root element that follows the extension additions. If there is no such element, this is -1.
curIDCurrent decode group.
lastMandatoryIDIdentifier of last mandatory element.
groupModeThis parameter must be setted to TRUE when decoding groups or base types.
Returns
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.

◆ rtXmlpGetReader()

EXTERNXML struct OSXMLReader* rtXmlpGetReader ( OSCTXT *  pctxt)

This function fetches the XML reader structure from the context for use in low-level pull parser calls.

If the reader structure does not exist, it is created and initialized.

Parameters
pctxtPointer to context block structure.
Returns
Pointer to XML reader structure or NULL if an error occurred.

◆ rtXmlpGetXmlnsAttrs()

EXTERNXML int rtXmlpGetXmlnsAttrs ( OSCTXT *  pctxt,
OSRTDList *  pNSAttrs 
)

This function decodes namespace attributes from start tag and adds them to the given list.

Parameters
pctxtPointer to context block structure.
pNSAttrsA pointer to a linked list of OSXMLNamespace structures.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpGetXSITypeAttr()

EXTERNXML 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).

Parameters
pctxtPointer to context block structure.
ppAttrValueA pointer to a pointer to a UTF8 character string to received the decoded XSI type QName.
nsidxA pointer to OSINT16 value to received the decoded XSI type namespace index.
pLocalOffsA pointer to size_t value to received the local name offset in ppAttrValue. When pLocalOffs value equal NULL function return in ppAttrValue local name only.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpGetXSITypeIndex()

EXTERNXML 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.

Parameters
pctxtPointer to context block structure.
typetabXSI types descriptor table.
typetabsizNumber of descriptors in table.
Returns
Completion status of operation:
  • positive or zero value is type index,
  • negative return value is error.

◆ rtXmlpHasAttributes()

EXTERNXML OSBOOL rtXmlpHasAttributes ( OSCTXT *  pctxt)

This function checks accessibility of attributes.

Parameters
pctxtPointer to context block structure.
Returns
Completion status of operation:
  • TRUE = attributes are present and access is enabled,
  • FALSE = attributes are absent or access is disabled.

◆ rtXmlpHideAttributes()

EXTERNXML void rtXmlpHideAttributes ( OSCTXT *  pctxt)

Disable access to attributes.

Function used in derived types to disable repeated decode in base type.

Parameters
pctxtPointer to context block structure.

◆ rtXmlpIsDecodeAsGroup()

EXTERNXML OSBOOL rtXmlpIsDecodeAsGroup ( OSCTXT *  pctxt)

This function checks if "decode as group" mode was forced.

Parameters
pctxtPointer to context block structure.
Returns
State of mode:
  • TRUE = need decode as group,
  • FALSE = normal sequence decoding.

◆ rtXmlpIsEmptyElement()

EXTERNXML OSBOOL rtXmlpIsEmptyElement ( OSCTXT *  pctxt)

Check element content: empty or not.

Parameters
pctxtPointer to context block structure.
Returns
Status of element content:
  • TRUE = element is empty,
  • FALSE = element has content.

◆ rtXmlpIsLastEventDone()

EXTERNXML OSBOOL rtXmlpIsLastEventDone ( OSCTXT *  pctxt)

Check processing status of current tag.

Parameters
pctxtPointer to context block structure.
Returns
Status of element content:
  • TRUE = tag marked as processed,
  • FALSE = tag will be processed again.

◆ rtXmlpIsUTF8Encoding()

EXTERNXML OSBOOL rtXmlpIsUTF8Encoding ( OSCTXT *  pctxt)

This function checks if the encoding specified in XML header is UTF-8.

Parameters
pctxtPointer to context block structure.
Returns
State of mode:
  • TRUE = is in UTF-8 encoding,
  • FALSE = is not in UTF-8 encoding.

◆ rtXmlpListHasItem()

EXTERNXML OSBOOL rtXmlpListHasItem ( OSCTXT *  pctxt)

Check for end of decoded token list.

Parameters
pctxtPointer to context block structure.
Returns
State of decoded list:
  • TRUE = list is not finished,
  • FALSE = all tokens was decoded.

◆ rtXmlpLookupXSITypeIndex()

EXTERNXML 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.

Parameters
pctxtPointer to context block structure.
pXsiTypeA pointer to XSI type name.
xsiTypeIdxA XSI type namespace index.
typetabXSI types descriptor table.
typetabsizNumber of descriptors in table.
Returns
Completion status of operation:
  • positive or zero value is type index,
  • negative return value is error.

◆ rtXmlpMarkLastEventActive()

EXTERNXML int rtXmlpMarkLastEventActive ( OSCTXT *  pctxt)

This function marks current tag as unprocessed.

This will cause the element to be processed again in the next pull-parser function.

Parameters
pctxtPointer to context block structure.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpMarkPos()

EXTERNXML void rtXmlpMarkPos ( OSCTXT *  pctxt)

Save current decode position.

Parameters
pctxtPointer to context block structure.

◆ rtXmlpMatchEndTag()

EXTERNXML int rtXmlpMatchEndTag ( OSCTXT *  pctxt,
OSINT32  level 
)

This function parse next end tag that matches with given name.

Parameters
pctxtPointer to context block structure.
levelNesting level of parsed start tag. When value equal -1 function parse next end tag with current level.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpMatchStartTag()

EXTERNXML int rtXmlpMatchStartTag ( OSCTXT *  pctxt,
const OSUTF8CHAR *  elemLocalName,
OSINT16  nsidx 
)

This function parses the next start tag that matches with given name.

Parameters
pctxtPointer to context block structure.
elemLocalNameName of parsed element.
nsidxNamespace index:
  • 0 = attribute is unqualified,
  • positive value is user namespace from generated namespace table,
  • negative value is predefined namespace like XSD instance and ect.
Returns
Completion status of operation:
  • 0 = success,
  • negative return value is error.

◆ rtXmlpNeedDecodeAttributes()

EXTERNXML OSBOOL rtXmlpNeedDecodeAttributes ( OSCTXT *  pctxt)

This function checks if attributes were previously decoded.

Parameters
pctxtPointer to context block structure.
Returns
State of attributes:
  • TRUE = attributes was not decoded,
  • FALSE = attributes had been decoded.

◆ rtXmlpReadBytes()

EXTERNXML int rtXmlpReadBytes ( OSCTXT *  pctxt,
OSOCTET *  pbuf,
OSSIZE  nbytes 
)

This function reads the specified number of bytes directly from the underlying XML parser stream.

It has no effect on any of the parser state variables.

Parameters
pctxtPointer to context block structure.
pbufPointer to static buffer (byte array) to receive data. The buffer must be at least large enough to hold the requested number of bytes.
nbytesNumber of bytes to read.
Returns
State of mode:
  • TRUE = is in UTF-8 encoding,
  • FALSE = is not in UTF-8 encoding.

◆ rtXmlpResetMarkedPos()

EXTERNXML void rtXmlpResetMarkedPos ( OSCTXT *  pctxt)

Reset saved decode position.

Parameters
pctxtPointer to context block structure.

◆ rtXmlpRewindToMarkedPos()

EXTERNXML void rtXmlpRewindToMarkedPos ( OSCTXT *  pctxt)

Rewind to saved decode position.

Parameters
pctxtPointer to context block structure.

◆ rtXmlpSelectAttribute()

EXTERNXML int rtXmlpSelectAttribute ( OSCTXT *  pctxt,
OSXMLNameFragments pAttr,
OSINT16 *  nsidx,
OSSIZE  attrIndex 
)

This function selects attribute to decode.

Parameters
pctxtPointer to context block structure.
pAttrPointer to structure to receive the various parts of an attribute name.
nsidxPointer to value to receive namespace index:
  • 0 = attribute is unqualified,
  • positive value is user namespace from generated namespace table,
  • negative value is predefined namespace like XSD instance and ect (see enum OSXMLNsIndex)
attrIndexIndex of selected attribute.
Returns
Completion status of operation:
  • positive or zero return value is attribute index in descriptor table,
  • negative return value is error.

◆ rtXmlpSetListMode()

EXTERNXML void rtXmlpSetListMode ( OSCTXT *  pctxt)

Sets list mode.

Attribute value or element content is decoded by tokens.

Parameters
pctxtPointer to context block structure.

◆ rtXmlpSetMixedContentMode()

EXTERNXML OSBOOL rtXmlpSetMixedContentMode ( OSCTXT *  pctxt,
OSBOOL  mixedContentMode 
)

Sets mixed content mode.

Parameters
pctxtPointer to context block structure.
mixedContentModeEnable/disable mixed mode.
Returns
Previously state of mixed mode.

◆ rtXmlpSetNamespaceTable()

EXTERNXML void rtXmlpSetNamespaceTable ( OSCTXT *  pctxt,
const OSUTF8CHAR *  namespaceTable[],
OSSIZE  nmNamespaces 
)

Sets user namespace table.

Parameters
pctxtPointer to context block structure.
namespaceTableArray of namespace URI strings.
nmNamespacesNumber of namespaces in table.

◆ rtXmlpSetWhiteSpaceMode()

EXTERNXML void rtXmlpSetWhiteSpaceMode ( OSCTXT *  pctxt,
OSXMLWhiteSpaceMode  whiteSpaceMode 
)

Sets the whitespace treatment mode.

This mode affects the content and attribute values reading. For example, if OSXMLWSM_COLLAPSE mode is set then all spaces in returned data will be already collapsed.

Parameters
pctxtPointer to context block structure.
whiteSpaceModeWhite space mode.
Returns
Previously set whitespace mode.