XML pull-parser decode functions.

Functions

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 rtXmlpDecAnyAttrStr (OSCTXT *pctxt, const OSUTF8CHAR **ppAttrStr, size_t index)
 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, OSINT32 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, OSUINT32 *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, size_t 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) and XML namespace 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, size_t 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, size_t 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, size_t index)
 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 rtXmlpGetNextSeqElemID (OSCTXT *pctxt, const OSXMLElemIDRec *tab, const OSXMLGroupDesc *pGroup, int curID, int lastMandatoryID, OSBOOL groupMode)
 This function parses the next start tag and find index of element name in descriptor table.
int rtXmlpGetNextAllElemID (OSCTXT *pctxt, const OSXMLElemIDRec *tab, size_t nrows, const OSUINT8 *pOrder, OSUINT32 nOrder, OSUINT32 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, size_t nrows, const OSUINT16 *pOrder, OSUINT32 nOrder, OSUINT32 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, size_t nrows, const OSUINT32 *pOrder, OSUINT32 nOrder, OSUINT32 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[], size_t 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, size_t *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[], size_t 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[], size_t 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, size_t nbytes)
 This function reads the specified number of bytes directly from the underlying XML parser stream.

Function Documentation

int rtXmlEncAttrC14N ( OSCTXT *  pctxt  ) 

This function used only in C14 mode.

It provide atributes sorting.

Parameters:
pctxt Pointer to context block structure.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
void rtXmlpCountListItems ( OSCTXT *  pctxt,
OSSIZE *  itemCnt 
)

Count tokens in list.

Parameters:
pctxt Pointer to context block structure.
itemCnt Pointer 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.
int rtXmlpCreateReader ( OSCTXT *  pctxt  ) 

Creates pull parser reader structure within the context.

Parameters:
pctxt Pointer to context block structure.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer 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.
int rtXmlpDecAnyAttrStr ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppAttrStr,
size_t  index 
)

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:
pctxt Pointer to context block structure.
ppAttrStr Pointer to UTF8 character string pointer to receive decoded attribute string. Memory is allocated for the string using the run-time memory manager.
index Index of attribute.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer 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.
int rtXmlpDecBase64Str ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSUINT32 *  pnocts,
OSINT32  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:
pctxt A 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.
pvalue A 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.
pnocts A pointer to an integer value to receive the decoded number of octets.
bufsize The 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.
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:
pctxt Pointer to context block structure.
pvalue Pointer 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.
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:
pctxt Pointer to context block structure.
pvalue Pointer to a variable to receive the decoded boolean value.
pnbits Pointer to hold decoded number of bits.
bufsize Size of buffer passed in pvalue argument.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to a variable to receive the decoded boolean value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to 64-bit double value to receive decoded result.
totalDigits Number of total digits in the decimal number from XSD totalDigits facet value. Argument should be set to -1 if facet not given.
fractionDigits Number 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.
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:
pctxt Pointer to context block structure.
pvalue Pointer to 64-bit double value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
flags Specifies 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
pvalue Pointer to 64-bit double value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt A 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.
pvalue A 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.
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:
pctxt Pointer to context block structure.
pvalue Pointer to a variable to receive the decoded boolean value.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt A 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.
pvalue A 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.
int rtXmlpDecDynUnicodeStr ( OSCTXT *  pctxt,
const OSUNICHAR **  ppdata,
OSUINT32 *  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:
pctxt Pointer to context block structure.
ppdata Pointer 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.
pnchars Pointer to integer variables to receive the number of characters in the string.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
outdata Pointer 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.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
int rtXmlpDecHexStr ( OSCTXT *  pctxt,
OSOCTET *  pvalue,
OSUINT32 *  pnocts,
OSINT32  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:
pctxt A 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.
pvalue A 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.
pnocts A pointer to an integer value to receive the decoded number of octets.
bufsize The 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.
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:
pctxt Pointer to context block structure.
pvalue Pointer to 32-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to 16-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to 64-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to 8-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pBitMap Pointer to bit map structure that defined token to bit mappings.
pvalue Pointer to buffer to recieve decoded bit map.
pnbits Number of bits in decoded bit map.
bufsize Size of buffer passed in to received decoded bit values.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt A 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.
plist A 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.
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:
pctxt Pointer to context block structure.
pvalue OSXSDDateTime type pointer points to a OSXSDDateTime value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned 32-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned 16-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned 64-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
pvalue Pointer to unsigned 8-bit integer value to receive decoded result.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
int rtXmlpDecUTF8Str ( OSCTXT *  pctxt,
OSUTF8CHAR *  out,
size_t  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:
pctxt Pointer to context block structure.
out Pointer to an array of OSUTF8CHAR to receive decoded UTF-8 string.
max_len Length of out array.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
outdata Pointer 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.
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:
pctxt A 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.
plist A 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.
int rtXmlpDecXSIAttr ( OSCTXT *  pctxt,
const OSXMLNameFragments *  attrName 
)

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

Parameters:
pctxt A 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.
attrName A 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.
int rtXmlpDecXSIAttrs ( OSCTXT *  pctxt  ) 

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

Parameters:
pctxt Pointer to context block structure.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
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).

Parameters:
pctxt A 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.
attrName A 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.
ppAttrValue A 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.
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:
pctxt Pointer to context block structure.
int rtXmlpGetAttributeCount ( OSCTXT *  pctxt  ) 

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

Parameters:
pctxt Pointer to context block structure.
Returns:
Completion status of operation:
  • zero or positive value is atributes number,
  • negative return value is error.
int rtXmlpGetAttributeID ( const OSXMLStrFragment *  attrName,
OSINT16  nsidx,
size_t  nAttr,
const OSXMLAttrDescr  attrNames[],
OSUINT32  attrPresent[] 
)

This function finds an attribute in the descriptor table.

Parameters:
attrName A 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.
nsidx 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.
nAttr Number of descriptors in table.
attrNames Attributes descriptor table.
attrPresent Bit 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.
OSINT32 rtXmlpGetCurrentLevel ( OSCTXT *  pctxt  ) 

This function returns current nesting level.

Parameters:
pctxt Pointer to context block structure.
Returns:
Current nesting level.
int rtXmlpGetNextAllElemID ( OSCTXT *  pctxt,
const OSXMLElemIDRec *  tab,
size_t  nrows,
const OSUINT8 *  pOrder,
OSUINT32  nOrder,
OSUINT32  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:
pctxt Pointer to context block structure.
tab Elements descriptor table.
nrows Number of descriptors in table.
pOrder Pointer to array to receive elements order.
nOrder Last element's index in order array.
maxOrder Size of order array.
anyID Identifier of xsd:any element.
Returns:
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.
int rtXmlpGetNextAllElemID16 ( OSCTXT *  pctxt,
const OSXMLElemIDRec *  tab,
size_t  nrows,
const OSUINT16 *  pOrder,
OSUINT32  nOrder,
OSUINT32  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:
pctxt Pointer to context block structure.
tab Elements descriptor table.
nrows Number of descriptors in table.
pOrder Pointer to array to receive elements order.
nOrder Last element's index in order array.
maxOrder Size of order array.
anyID Identifier of xsd:any element.
Returns:
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.
int rtXmlpGetNextAllElemID32 ( OSCTXT *  pctxt,
const OSXMLElemIDRec *  tab,
size_t  nrows,
const OSUINT32 *  pOrder,
OSUINT32  nOrder,
OSUINT32  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:
pctxt Pointer to context block structure.
tab Elements descriptor table.
nrows Number of descriptors in table.
pOrder Pointer to array to receive elements order.
nOrder Last element's index in order array.
maxOrder Size of order array.
anyID Identifier of xsd:any element.
Returns:
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.
int rtXmlpGetNextElem ( OSCTXT *  pctxt,
OSXMLElemDescr *  pElem,
OSINT32  level 
)

This function parse the next element start tag.

Parameters:
pctxt Pointer to context block structure.
pElem Pointer to a structure to receive the decoded element descriptor.
level Nesting 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.
int rtXmlpGetNextElemID ( OSCTXT *  pctxt,
const OSXMLElemIDRec *  tab,
size_t  nrows,
OSINT32  level,
OSBOOL  continueParse 
)

This function parses the next start tag and finds the index of the element name in the descriptor table.

Parameters:
pctxt Pointer to context block structure.
tab Elements descriptor table.
nrows Number of descriptors in table.
level Nesting level of parsed start tag. When value equal -1 function parse next start tag.
continueParse When value equals TRUE function skips unrecignized elements.
Returns:
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.
int rtXmlpGetNextSeqElemID ( OSCTXT *  pctxt,
const OSXMLElemIDRec *  tab,
const OSXMLGroupDesc *  pGroup,
int  curID,
int  lastMandatoryID,
OSBOOL  groupMode 
)

This function parses the next start tag and find index of element name in descriptor table.

It is used to decode sequences in strict mode.

Parameters:
pctxt Pointer to context block structure.
tab Elements descriptor table.
pGroup Decode groups table.
curID Current decode group.
lastMandatoryID Identifier of last mandatory element.
groupMode This parameter must be setted to TRUE when decode groups or base types.
Returns:
Completion status of operation:
  • positive or zero value is element identifier,
  • negative return value is error.
struct OSXMLReader* rtXmlpGetReader ( OSCTXT *  pctxt  )  [read]

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:
pctxt Pointer to context block structure.
Returns:
Pointer to XML reader structure or NULL if an error occurred.
int rtXmlpGetXmlnsAttrs ( OSCTXT *  pctxt,
OSRTDList *  pNSAttrs 
)

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

Parameters:
pctxt Pointer to context block structure.
pNSAttrs A pointer to a linked list of OSXMLNamespace structures.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
int rtXmlpGetXSITypeAttr ( OSCTXT *  pctxt,
const OSUTF8CHAR **  ppAttrValue,
OSINT16 *  nsidx,
size_t *  pLocalOffs 
)

This function decodes the contents of an XSI (XML Schema Instance) type attribute (xsi:type).

Parameters:
pctxt Pointer to context block structure.
ppAttrValue A pointer to a pointer to a UTF8 character string to received the decoded XSI type QName.
nsidx A pointer to OSINT16 value to received the decoded XSI type namespace index.
pLocalOffs A 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.
int rtXmlpGetXSITypeIndex ( OSCTXT *  pctxt,
const OSXMLItemDescr  typetab[],
size_t  typetabsiz 
)

This function decodes the contents of an XSI (XML Schema Instance) type attribute (xsi:type) and find type index in descriptor table.

Parameters:
pctxt Pointer to context block structure.
typetab XSI types descriptor table.
typetabsiz Number of descriptors in table.
Returns:
Completion status of operation:
  • positive or zero value is type index,
  • negative return value is error.
OSBOOL rtXmlpHasAttributes ( OSCTXT *  pctxt  ) 

This function checks accessibility of attributes.

Parameters:
pctxt Pointer 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.
void rtXmlpHideAttributes ( OSCTXT *  pctxt  ) 

Disable access to attributes.

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

Parameters:
pctxt Pointer to context block structure.
OSBOOL rtXmlpIsDecodeAsGroup ( OSCTXT *  pctxt  ) 

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

Parameters:
pctxt Pointer to context block structure.
Returns:
State of mode:
  • TRUE = need decode as group,
  • FALSE = normal sequence decoding.
OSBOOL rtXmlpIsEmptyElement ( OSCTXT *  pctxt  ) 

Check element content: empty or not.

Parameters:
pctxt Pointer to context block structure.
Returns:
Status of element content:
  • TRUE = element is empty,
  • FALSE = element has content.
OSBOOL rtXmlpIsLastEventDone ( OSCTXT *  pctxt  ) 

Check processing status of current tag.

Parameters:
pctxt Pointer to context block structure.
Returns:
Status of element content:
  • TRUE = tag marked as processed,
  • FALSE = tag will be processed again.
OSBOOL rtXmlpIsUTF8Encoding ( OSCTXT *  pctxt  ) 

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

Parameters:
pctxt Pointer to context block structure.
Returns:
State of mode:
  • TRUE = is in UTF-8 encoding,
  • FALSE = is not in UTF-8 encoding.
OSBOOL rtXmlpListHasItem ( OSCTXT *  pctxt  ) 

Check for end of decoded token list.

Parameters:
pctxt Pointer to context block structure.
Returns:
State of decoded list:
  • TRUE = list is not finished,
  • FALSE = all tokens was decoded.
int rtXmlpLookupXSITypeIndex ( OSCTXT *  pctxt,
const OSUTF8CHAR *  pXsiType,
OSINT16  xsiTypeIdx,
const OSXMLItemDescr  typetab[],
size_t  typetabsiz 
)

This function find index of XSI (XML Schema Instance) type in descriptor table.

Parameters:
pctxt Pointer to context block structure.
pXsiType A pointer to XSI type name.
xsiTypeIdx A XSI type namespace index.
typetab XSI types descriptor table.
typetabsiz Number of descriptors in table.
Returns:
Completion status of operation:
  • positive or zero value is type index,
  • negative return value is error.
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:
pctxt Pointer to context block structure.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
void rtXmlpMarkPos ( OSCTXT *  pctxt  ) 

Save current decode position.

Parameters:
pctxt Pointer to context block structure.
int rtXmlpMatchEndTag ( OSCTXT *  pctxt,
OSINT32  level 
)

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

Parameters:
pctxt Pointer to context block structure.
level Nesting 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.
int rtXmlpMatchStartTag ( OSCTXT *  pctxt,
const OSUTF8CHAR *  elemLocalName,
OSINT16  nsidx 
)

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

Parameters:
pctxt Pointer to context block structure.
elemLocalName Name of parsed element.
nsidx 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.
Returns:
Completion status of operation:
  • 0 = success,
  • negative return value is error.
OSBOOL rtXmlpNeedDecodeAttributes ( OSCTXT *  pctxt  ) 

This function checks if attributes were previously decoded.

Parameters:
pctxt Pointer to context block structure.
Returns:
State of attributes:
  • TRUE = attributes was not decoded,
  • FALSE = attributes had been decoded.
int rtXmlpReadBytes ( OSCTXT *  pctxt,
OSOCTET *  pbuf,
size_t  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:
pctxt Pointer to context block structure.
pbuf Pointer to static buffer (byte array) to receive data. The buffer must be at least large enough to hold the requested number of bytes.
nbytes Number of bytes to read.
Returns:
State of mode:
  • TRUE = is in UTF-8 encoding,
  • FALSE = is not in UTF-8 encoding.
void rtXmlpResetMarkedPos ( OSCTXT *  pctxt  ) 

Reset saved decode position.

Parameters:
pctxt Pointer to context block structure.
void rtXmlpRewindToMarkedPos ( OSCTXT *  pctxt  ) 

Rewind to saved decode position.

Parameters:
pctxt Pointer to context block structure.
int rtXmlpSelectAttribute ( OSCTXT *  pctxt,
OSXMLNameFragments *  pAttr,
OSINT16 *  nsidx,
size_t  index 
)

This function selects attribute to decode.

Parameters:
pctxt Pointer to context block structure.
pAttr Pointer to structure to receive the various parts of an attribute name.
nsidx Pointer 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)
index Index of selected attribute.
Returns:
Completion status of operation:
  • positive or zero return value is attribute index in descriptor table,
  • negative return value is error.
void rtXmlpSetListMode ( OSCTXT *  pctxt  ) 

Sets list mode.

Attribute value or element content is decoded by tokens.

Parameters:
pctxt Pointer to context block structure.
OSBOOL rtXmlpSetMixedContentMode ( OSCTXT *  pctxt,
OSBOOL  mixedContentMode 
)

Sets mixed content mode.

Parameters:
pctxt Pointer to context block structure.
mixedContentMode Enable/disable mixed mode.
Returns:
Previously state of mixed mode.
void rtXmlpSetNamespaceTable ( OSCTXT *  pctxt,
const OSUTF8CHAR *  namespaceTable[],
size_t  nmNamespaces 
)

Sets user namespace table.

Parameters:
pctxt Pointer to context block structure.
namespaceTable Array of namespace URI strings.
nmNamespaces Number of namespaces in table.
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:
pctxt Pointer to context block structure.
whiteSpaceMode White space mode.
Returns:
Previously set whitespace mode.