XML QName type definition and associated utility functions.
More...
Go to the source code of this file.
|
EXTERNRT OSXMLFullQName * | rtxNewFullQName (OSCTXT *pctxt, const OSUTF8CHAR *localName, const OSUTF8CHAR *prefix, const OSUTF8CHAR *nsuri) |
| This function creates a new full QName structure given the parts. More...
|
|
EXTERNRT OSXMLFullQName * | rtxNewFullQNameDeepCopy (OSCTXT *pctxt, const OSXMLFullQName *pqname) |
| This function allocates a new QName instance and makes a deep copy of the given QName including the strings inside. More...
|
|
EXTERNRT void | rtxQNameDeepCopy (OSCTXT *pctxt, OSXMLFullQName *pdest, const OSXMLFullQName *psrc) |
| This function makes a deep copy of the given QName including the strings inside. More...
|
|
EXTERNRT void | rtxQNameFreeMem (OSCTXT *pctxt, OSXMLFullQName *pqname, OSBOOL dynamic) |
| This function frees all memory within a QName structure,. More...
|
|
EXTERNRT OSUINT32 | rtxQNameHash (const OSXMLFullQName *pqname) |
| This function computes a hash code for the given QName. More...
|
|
EXTERNRT OSBOOL | rtxQNamesEqual (const OSXMLFullQName *pqname1, const OSXMLFullQName *pqname2) |
| This function tests 2 QNames for equality. More...
|
|
EXTERNRT const OSUTF8CHAR * | rtxQNameToString (const OSXMLFullQName *pqname, OSUTF8CHAR *buffer, OSUINT32 bufsiz) |
| This function returns the QName in the following stringified format: {uri}/localName. More...
|
|
XML QName type definition and associated utility functions.
Definition in file rtxXmlQName.h.
◆ rtxNewFullQName()
EXTERNRT OSXMLFullQName* rtxNewFullQName |
( |
OSCTXT * |
pctxt, |
|
|
const OSUTF8CHAR * |
localName, |
|
|
const OSUTF8CHAR * |
prefix, |
|
|
const OSUTF8CHAR * |
nsuri |
|
) |
| |
This function creates a new full QName structure given the parts.
Memory is allocated for the structure using rtxMemAlloc. Copies are not made of the string variables - the pointers are stored.
- Parameters
-
pctxt | Pointer to a context structure. |
localName | Element local name. |
prefix | Namespace prefix. |
nsuri | Namespace URI. |
- Returns
- QName value. Memory for the value will have been allocated by rtxMemAlloc and thus must be freed using one of the rtxMemFree functions. The value will be NULL if no dynamic memory was available.
◆ rtxNewFullQNameDeepCopy()
This function allocates a new QName instance and makes a deep copy of the given QName including the strings inside.
- Parameters
-
pctxt | Pointer to a context structure. |
pqname | Pointer to QName to be copied. |
- Returns
- Deep copy of QName structure.
◆ rtxQNameDeepCopy()
This function makes a deep copy of the given QName including the strings inside.
- Parameters
-
pctxt | Pointer to a context structure. |
pdest | Pointer to QName to receive copied data. |
psrc | Pointer to QName to be copied. |
◆ rtxQNameFreeMem()
This function frees all memory within a QName structure,.
- Parameters
-
pctxt | Pointer to a context structure. |
pqname | Pointer to QName in which memory will be freed. |
dynamic | Boolean indicating if pqname is dynamic. If true, the memory for pqname is freed. |
◆ rtxQNameHash()
This function computes a hash code for the given QName.
- Parameters
-
pqname | Pointer to QName structure. |
- Returns
- Computed hash code.
◆ rtxQNamesEqual()
This function tests 2 QNames for equality.
- Parameters
-
pqname1 | Pointer to QName structure. |
pqname2 | Pointer to QName structure. |
- Returns
- True if names equal; false, otherwise.
◆ rtxQNameToString()
EXTERNRT const OSUTF8CHAR* rtxQNameToString |
( |
const OSXMLFullQName * |
pqname, |
|
|
OSUTF8CHAR * |
buffer, |
|
|
OSUINT32 |
bufsiz |
|
) |
| |
This function returns the QName in the following stringified format: {uri}/localName.
- Parameters
-
pqname | Pointer to QName structure. |
buffer | Buffer into which to return name. |
bufsiz | Size of buffer into which name is to be returned. If name will not fit in buffer, it is truncated. |
- Returns
- Pointer to string (address of 'buffer' argument).