XML decode functions.
Functions | |
int | rtXmlDecBase64Binary (OSRTMEMBUF *pMemBuf, const OSUTF8CHAR *inpdata, int length) |
This function decodes the contents of a Base64-encoded binary data type into a memory buffer. | |
int | rtXmlDecBase64Str (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, OSINT32 bufsize) |
This function decodes a contents of a Base64-encode binary string into a static memory structure. | |
int | rtXmlDecBase64StrValue (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, size_t bufSize, size_t srcDataLen) |
This function decodes a contents of a Base64-encode binary string into the specified octet array. | |
int | rtXmlDecBigInt (OSCTXT *pctxt, const OSUTF8CHAR **ppvalue) |
This function will decode a variable of the XSD integer type. | |
int | rtXmlDecBool (OSCTXT *pctxt, OSBOOL *pvalue) |
This function decodes a variable of the boolean type. | |
int | rtXmlDecDate (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'date' type. | |
int | rtXmlDecTime (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'time' type. | |
int | rtXmlDecDateTime (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'dateTime' type. | |
int | rtXmlDecDecimal (OSCTXT *pctxt, OSREAL *pvalue) |
This function decodes the contents of a decimal data type. | |
int | rtXmlDecDouble (OSCTXT *pctxt, OSREAL *pvalue) |
This function decodes the contents of a float or double data type. | |
int | rtXmlDecDynBase64Str (OSCTXT *pctxt, OSDynOctStr *pvalue) |
This function decodes a contents of a Base64-encode binary string. | |
int | rtXmlDecDynHexStr (OSCTXT *pctxt, OSDynOctStr *pvalue) |
This function decodes a contents of a hexBinary string. | |
int | rtXmlDecEmptyElement (OSCTXT *pctxt) |
This function is used to enforce a requirement that an element be empty. | |
int | rtXmlDecUTF8Str (OSCTXT *pctxt, OSUTF8CHAR *outdata, size_t max_len) |
This function decodes the contents of a UTF-8 string data type. | |
int | rtXmlDecDynUTF8Str (OSCTXT *pctxt, const OSUTF8CHAR **outdata) |
This function decodes the contents of a UTF-8 string data type. | |
int | rtXmlDecHexBinary (OSRTMEMBUF *pMemBuf, const OSUTF8CHAR *inpdata, int length) |
This function decodes the contents of a hex-encoded binary data type into a memory buffer. | |
int | rtXmlDecHexStr (OSCTXT *pctxt, OSOCTET *pvalue, OSUINT32 *pnocts, OSINT32 bufsize) |
This function decodes the contents of a hexBinary string into a static memory structure. | |
int | rtXmlDecGYear (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gYear' type. | |
int | rtXmlDecGYearMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gYearMonth' type. | |
int | rtXmlDecGMonth (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gMonth' type. | |
int | rtXmlDecGMonthDay (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gMonthDay' type. | |
int | rtXmlDecGDay (OSCTXT *pctxt, OSXSDDateTime *pvalue) |
This function decodes a variable of the XSD 'gDay' type. | |
int | rtXmlDecInt (OSCTXT *pctxt, OSINT32 *pvalue) |
This function decodes the contents of a 32-bit integer data type. | |
int | rtXmlDecInt8 (OSCTXT *pctxt, OSINT8 *pvalue) |
This function decodes the contents of an 8-bit integer data type (i.e. | |
int | rtXmlDecInt16 (OSCTXT *pctxt, OSINT16 *pvalue) |
This function decodes the contents of a 16-bit integer data type. | |
int | rtXmlDecInt64 (OSCTXT *pctxt, OSINT64 *pvalue) |
This function decodes the contents of a 64-bit integer data type. | |
int | rtXmlDecUInt (OSCTXT *pctxt, OSUINT32 *pvalue) |
This function decodes the contents of an unsigned 32-bit integer data type. | |
int | rtXmlDecUInt8 (OSCTXT *pctxt, OSUINT8 *pvalue) |
This function decodes the contents of an unsigned 8-bit integer data type (i.e. | |
int | rtXmlDecUInt16 (OSCTXT *pctxt, OSUINT16 *pvalue) |
This function decodes the contents of an unsigned 16-bit integer data type. | |
int | rtXmlDecUInt64 (OSCTXT *pctxt, OSUINT64 *pvalue) |
This function decodes the contents of an unsigned 64-bit integer data type. | |
int | rtXmlDecNSAttr (OSCTXT *pctxt, const OSUTF8CHAR *attrName, const OSUTF8CHAR *attrValue, OSRTDList *pNSAttrs, const OSUTF8CHAR *nsTable[], OSUINT32 nsTableRowCount) |
This function decodes an XML namespac attribute (xmlns). | |
const OSUTF8CHAR * | rtXmlDecQName (OSCTXT *pctxt, const OSUTF8CHAR *qname, const OSUTF8CHAR **prefix) |
This function decodes an XML qualified name string (QName) type. | |
int | rtXmlDecXSIAttr (OSCTXT *pctxt, const OSUTF8CHAR *attrName, const OSUTF8CHAR *attrValue) |
This function decodes XML schema instance (XSI) attribute. | |
int | rtXmlDecXSIAttrs (OSCTXT *pctxt, const OSUTF8CHAR *const *attrs, const char *typeName) |
This function decodes XML schema instance (XSI) attributes. | |
int | rtXmlDecXmlStr (OSCTXT *pctxt, OSXMLSTRING *outdata) |
This function decodes the contents of an XML string data type. | |
int | rtXmlParseElementName (OSCTXT *pctxt, OSUTF8CHAR **ppName) |
This function parses the initial tag from an XML message. | |
int | rtXmlParseElemQName (OSCTXT *pctxt, OSXMLQName *pQName) |
This function parses the initial tag from an XML message. |
Function Documentation
int rtXmlDecBase64Binary | ( | OSRTMEMBUF * | pMemBuf, | |
const OSUTF8CHAR * | inpdata, | |||
int | length | |||
) |
This function decodes the contents of a Base64-encoded binary data type into a memory buffer.
Input is expected to be a string of UTF-8 characters returned by an XML parser. The decoded data will be put into the memory buffer starting from the current position and bit offset. After all data is decoded the octet string may be fetched out.
This function is normally used in the 'characters' SAX handler.
- Parameters:
-
pMemBuf Memory buffer to which decoded binary data is to be appended. inpdata Pointer to a source string to be decoded. length Length of the source string (in characters).
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlDecBase64Str | ( | OSCTXT * | pctxt, | |
OSOCTET * | pvalue, | |||
OSUINT32 * | pnocts, | |||
OSINT32 | bufsize | |||
) |
This function decodes a contents of a Base64-encode binary string into a static memory structure.
The octet string must be Base64 encoded. This function call is used to decode a sized base64Binary string production.
- 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 rtXmlDecBase64StrValue | ( | OSCTXT * | pctxt, | |
OSOCTET * | pvalue, | |||
OSUINT32 * | pnocts, | |||
size_t | bufSize, | |||
size_t | srcDataLen | |||
) |
This function decodes a contents of a Base64-encode binary string into the specified octet array.
The octet string must be Base64 encoded. This function call is used internally to decode both sized and non-sized base64binary string production.
- 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 A maximum size (in octets) of pvalue
buffer. An error will occur if the number of octets in the decoded string is larger than this value.srcDataLen An actual source data length (in octets) without whitespaces.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlDecBigInt | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR ** | ppvalue | |||
) |
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.
- Parameters:
-
pctxt Pointer to context block structure. ppvalue 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 rtXmlDecBool | ( | OSCTXT * | pctxt, | |
OSBOOL * | pvalue | |||
) |
This function decodes a variable of the boolean type.
- 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 rtXmlDecDate | ( | 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 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 rtXmlDecDateTime | ( | 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 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 rtXmlDecDecimal | ( | OSCTXT * | pctxt, | |
OSREAL * | pvalue | |||
) |
This function decodes the contents of a decimal data type.
Input is expected to be a string of characters returned by an XML 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 rtXmlDecDouble | ( | OSCTXT * | pctxt, | |
OSREAL * | pvalue | |||
) |
This function decodes the contents of a float or double data type.
Input is expected to be a string of characters returned by an XML 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 rtXmlDecDynBase64Str | ( | 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.
- 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 rtXmlDecDynHexStr | ( | OSCTXT * | pctxt, | |
OSDynOctStr * | pvalue | |||
) |
This function decodes a contents of a hexBinary string.
This function will allocate dynamic memory to store the decoded result.
- 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 rtXmlDecDynUTF8Str | ( | 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 UTF-8 or Unicode characters returned by an XML 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 rtXmlDecEmptyElement | ( | OSCTXT * | pctxt | ) |
This function is used to enforce a requirement that an element be empty.
An error is returned in the current element has any element or character children. The last event must be the start tag.
- 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.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlDecGDay | ( | 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 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 rtXmlDecGMonth | ( | 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 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 rtXmlDecGMonthDay | ( | 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 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 rtXmlDecGYear | ( | 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 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 rtXmlDecGYearMonth | ( | 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 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 rtXmlDecHexBinary | ( | OSRTMEMBUF * | pMemBuf, | |
const OSUTF8CHAR * | inpdata, | |||
int | length | |||
) |
This function decodes the contents of a hex-encoded binary data type into a memory buffer.
Input is expected to be a string of UTF-8 characters returned by an XML parser. The decoded data will be put into the given memory buffer starting from the current position and bit offset. After all data is decoded the octet string may be fetched out.
This function is normally used in the 'characters' SAX handler.
- Parameters:
-
pMemBuf Pointer to memory buffer onto which the decoded binary data will be appended. inpdata Pointer to a source string to be decoded. length Length of the source string (in characters).
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlDecHexStr | ( | OSCTXT * | pctxt, | |
OSOCTET * | pvalue, | |||
OSUINT32 * | pnocts, | |||
OSINT32 | bufsize | |||
) |
This function decodes the contents of a hexBinary string into a static memory structure.
- 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 rtXmlDecInt | ( | 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 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 rtXmlDecInt16 | ( | 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 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 rtXmlDecInt64 | ( | 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 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 rtXmlDecInt8 | ( | 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 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 rtXmlDecNSAttr | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR * | attrName, | |||
const OSUTF8CHAR * | attrValue, | |||
OSRTDList * | pNSAttrs, | |||
const OSUTF8CHAR * | nsTable[], | |||
OSUINT32 | nsTableRowCount | |||
) |
This function decodes an XML namespac attribute (xmlns).
It is assumed that the given attribute name is either 'xmlns' or 'xmlns:prefix'. The XML namespace prefix and URI are added to the given attribute list structure. The parsed namespace is also added to the namespace stack in the given context.
- Parameters:
-
pctxt Pointer to context structure. attrName Name of the XML namespace attribute. This is assumed to contain either 'xmlns' (a default namespace declaration) or 'xmlns:prefix' where prefix is a namespace prefix. attrValue XML namespace attribute value (a URI). pNSAttrs List to receive parsed namespace values. nsTable Namespace URI's parsed from schema. nsTableRowCount Number of rows (URI's) in namespace table.
- Returns:
- Zero if success or negative error code.
const OSUTF8CHAR* rtXmlDecQName | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR * | qname, | |||
const OSUTF8CHAR ** | prefix | |||
) |
This function decodes an XML qualified name string (QName) type.
This is a type that contains an optional namespace prefix followed by a colon and the local part of the name:
[NS 5] QName ::= (Prefix ':')? LocalPart
[NS 6] Prefix ::= NCName
[NS 7] LocalPart ::= NCName
- Parameters:
-
pctxt Pointer to context block structure. qname String containing XML QName to be decoded. prefix Pointer to string pointer to receive decoded prefix. This is optional. If NULL, the prefix will not be returned. If not-NULL, the prefix will be returned in memory allocated using rtxMemAlloc
which must be freed using one of thertxMemFree
functions.
- Returns:
- Pointer to local part of string. This is pointer to a location within the given string (i.e. a pointer to the character after the ':' or to the beginning of the string if it contains no colon). This pointer does not need to be freed.
int rtXmlDecTime | ( | 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 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 rtXmlDecUInt | ( | 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 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 rtXmlDecUInt16 | ( | 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 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 rtXmlDecUInt64 | ( | 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 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 rtXmlDecUInt8 | ( | OSCTXT * | pctxt, | |
OSUINT8 * | 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 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 rtXmlDecUTF8Str | ( | OSCTXT * | pctxt, | |
OSUTF8CHAR * | outdata, | |||
size_t | max_len | |||
) |
This function decodes the contents of a UTF-8 string data type.
Input is expected to be a string of UTF-8 or Unicode characters returned by an XML parser.
- Parameters:
-
pctxt Pointer to context block structure. outdata Pointer to a block of memory to receive decoded UTF8 string. max_len Size of memory block.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlDecXmlStr | ( | 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 rtXmlDecXSIAttr | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR * | attrName, | |||
const OSUTF8CHAR * | attrValue | |||
) |
This function decodes XML schema instance (XSI) attribute.
These attributes include the XSI namespace declaration, the XSD schema location attribute, and the XSD no namespace schema location attribute.
- Parameters:
-
pctxt Pointer to context block structure. attrName Attribute's name to be decoded attrValue Attribute's value to be decoded
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlDecXSIAttrs | ( | OSCTXT * | pctxt, | |
const OSUTF8CHAR *const * | attrs, | |||
const char * | typeName | |||
) |
This function decodes XML schema instance (XSI) attributes.
These attributes include the XSI namespace declaration, the XSD schema location attribute, and the XSD no namespace schema location attribute.
- Parameters:
-
pctxt Pointer to context block structure. attrs Attributes-values array [attr, value]. Should be null-terminated. typeName Name of parent type to add in error log, if would be necessary.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlParseElementName | ( | OSCTXT * | pctxt, | |
OSUTF8CHAR ** | ppName | |||
) |
This function parses the initial tag from an XML message.
If the tag is a QName, only the local part of the name is returned.
- Parameters:
-
pctxt Pointer to OSCTXT structure ppName Pointer to a pointer to receive decoded UTF-8 string. Dynamic memory is allocated for the variable using the rtxMemAlloc function.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.
int rtXmlParseElemQName | ( | OSCTXT * | pctxt, | |
OSXMLQName * | pQName | |||
) |
This function parses the initial tag from an XML message.
- Parameters:
-
pctxt Pointer to OSCTXT structure pQName Pointer to a QName structure to receive parsed name prefix and local name. Dynamic memory is allocated for both name parts using the rtxMemAlloc function.
- Returns:
- Completion status of operation:
- 0 = success,
- negative return value is error.