|
This function creates an instance of XML UTF-8 character string structure (OSXMLSTRING type) and initializes it by the passed values.
In contrary to rtxCreateXmlStr function, the string value is copied. This function uses rtxMemAlloc to allocate the memory for the OSXMLSTRING structure and for the string value being copied. To free memory, rtxMemFreePtr function may be used for both value and structure itself:
OSXMLSTRING* pStr = rtxCreateCopyXmlStr (....);
....
rtxMemFreePtr (pctxt, pStr->value);
rtxMemFreePtr (pctxt, pStr);
- Parameters:
-
| pctxt | Pointer to a context block |
| pStr | Pointer to a character string to be copied. |
| cdata | This indicates if this string should be encoded as a CDATA section in an XML document. |
- Returns:
- The allocated and initialized instance of OSXMLSTRING type.
|