-
Notifications
You must be signed in to change notification settings - Fork 113
API XMLSec Core Xmltree
API Group: xmlsec_core_xmltree
XML-tree navigation and manipulation helper functions.
XML tree functions.
Defined as: (((node)) ? ((const char*)((node)->name)) : NULL)
Source: include/xmlsec/xmltree.h
Macro. Returns node's name.
Parameters:
-
node— the pointer to node.
Defined as: (( (('0' <= (c)) && ((c) <= '9')) || \ (('a' <= (c)) && ((c) <= 'f')) || \ (('A' <= (c)) && ((c) <= 'F')) ) ? 1 : 0)
Source: include/xmlsec/xmltree.h
Returns 1 if the character is a hex digit.
Macro. Returns 1 if is a hex digit or 0 other wise.
Parameters:
-
c— the character.
Defined as: xmlSecFromHex(ch)
Source: include/xmlsec/xmltree.h
Deprecated. Returns the hex value of a character.
Deprecated. Macro. Returns the hex value of the ch.
Parameters:
-
ch— the character,
Defined as: ((xmlSecByte)( \ (('0' <= (ch)) && ((ch) <= '9')) ? (ch) - '0' : \ ( \ (('a' <= (ch)) && ((ch) <= 'f')) ? (ch) - 'a' + 10 : \ ( \ (('A' <= (ch)) && ((ch) <= 'F')) ? (ch) - 'A' + 10 : 0 \ ) \ ) \ ))
Source: include/xmlsec/xmltree.h
Macro. Returns the hex value of the ch.
Parameters:
-
ch— the character,
Defined as: ((xmlSecByte)((xmlSecFromHex(ch1) << 4) | (xmlSecFromHex(ch2))))
Source: include/xmlsec/xmltree.h
Returns the hex value of a two-character pair.
Macro. Returns the hex value of the pair (c1 c2).
Parameters:
-
ch1— the first character, -
ch2— the second character,
Defined as: ((xmlChar)( \ ((0 <= (vv)) && ((vv) <= 9)) ? (vv) + '0' : \ ( \ ((10 <= (vv)) && ((vv) <= 15)) ? (vv) + 'A' : 0 \ ) \ ))
Source: include/xmlsec/xmltree.h
Macro. Returns the hex character of the vv.
Parameters:
-
vv— the value,
typedef int(* xmlSecTreeWalkCallback) (xmlNodePtr cur, void *data))(xmlNodePtr cur, void *data);Source: include/xmlsec/xmltree.h
for XML tree walk.
Parameters:
-
cur— the current XML node. -
data— the user data passed to the callback.
Returns: 1 to continue the walk, 0 to stop the walk, or a negative value to stop the walk with an error.
typedef const xmlSecQName2IntegerInfo* xmlSecQName2IntegerInfoConstPtr;Source: include/xmlsec/xmltree.h
Pointer to constant QName <-> Integer conversion.
Pointer to constant QName <-> Integer conversion definition.
typedef unsigned int xmlSecBitMask;Source: include/xmlsec/xmltree.h
Bitmask datatype.
typedef const xmlSecQName2BitMaskInfo* xmlSecQName2BitMaskInfoConstPtr;Source: include/xmlsec/xmltree.h
Pointer to constant QName <-> Bitmask conversion.
Pointer to constant QName <-> Bitmask conversion definition.
const xmlChar * xmlSecGetDefaultLineFeed(void);Source: include/xmlsec/xmltree.h
Gets the current default linefeed.
Returns: the current default linefeed.
void xmlSecSetDefaultLineFeed(const xmlChar *linefeed);Source: include/xmlsec/xmltree.h
Sets the current default linefeed.
The caller must ensure that the linefeed string exists for the lifetime of the program or until the new linefeed is set.
Parameters:
-
linefeed— default linefeed.
const xmlChar * xmlSecGetNodeNsHref(const xmlNodePtr cur);Source: include/xmlsec/xmltree.h
Gets the node's namespace href.
Parameters:
-
cur— the pointer to node.
Returns: node's namespace href.
xmlChar * xmlSecGetNodeContentAndTrim(const xmlNodePtr cur);Source: include/xmlsec/xmltree.h
Reads and trims XML node content.
Reads cur node content and trims it (both sides).
Parameters:
-
cur— the pointer to XML node.
Returns: trimmed node content or NULL if an error occurs.
int xmlSecGetNodeContentAsSize(const xmlNodePtr cur, xmlSecSize defValue, xmlSecSize *res);Source: include/xmlsec/xmltree.h
Reads node content and converts it to an xmlSecSize.
Reads cur node content and converts it to xmlSecSize value.
Parameters:
-
cur— the pointer to XML node. -
defValue— the default value that will be returned inresif there is no node content. -
res— the pointer to the result value.
Returns: 0 on success or -1 on error.
int xmlSecGetNodeContentAsHex(const xmlNodePtr cur, xmlSecBufferPtr res);Source: include/xmlsec/xmltree.h
Reads node content and hex-decodes it into a buffer.
Reads cur node content (whitespace-trimmed), hex-decodes it, and stores the result in res. The buffer is emptied before writing.
Parameters:
-
cur— the pointer to XML node. -
res— the output buffer to store the decoded bytes.
Returns: 0 on success or -1 on error.
int xmlSecSetNodeContentAsHex(xmlNodePtr node, const xmlSecByte *data, xmlSecSize size);Source: include/xmlsec/xmltree.h
Hex-encodes data and sets it as node content.
Hex-encodes data and stores the result as node content for node.
Parameters:
-
node— the pointer to XML node. -
data— the input bytes. -
size— the input data size.
Returns: 0 on success or -1 on error.
int xmlSecCheckNodeName(const xmlNodePtr cur, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Checks if a node has the given name and namespace.
Checks that the node has a given name and a given namespace href.
Parameters:
-
cur— the pointer to an XML node. -
name— the name, -
ns— the namespace href.
Returns: 1 if the node matches or 0 otherwise.
xmlNodePtr xmlSecGetNextElementNode(xmlNodePtr cur);Source: include/xmlsec/xmltree.h
Searches for the next element node.
Parameters:
-
cur— the pointer to an XML node.
Returns: the pointer to next element node or NULL if it is not found.
xmlNodePtr xmlSecFindSibling(const xmlNodePtr cur, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Searches a node and its next siblings by name and namespace.
Searches cur and the next siblings of the cur node having given name and namespace href.
Parameters:
-
cur— the pointer to XML node. -
name— the name. -
ns— the namespace href (may be NULL).
Returns: the pointer to the found node or NULL if an error occurs or node is not found.
xmlNodePtr xmlSecFindChild(const xmlNodePtr parent, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Finds a direct child node by name and namespace.
Searches a direct child of the parent node having given name and namespace href.
Parameters:
-
parent— the pointer to XML node. -
name— the name. -
ns— the namespace href (may be NULL).
Returns: the pointer to the found node or NULL if an error occurs or node is not found.
xmlNodePtr xmlSecFindParent(const xmlNodePtr cur, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Searches ancestor nodes by name and namespace.
Searches the ancestors axis of the cur node for a node having given name and namespace href.
Parameters:
-
cur— the pointer to an XML node. -
name— the name. -
ns— the namespace href (may be NULL).
Returns: the pointer to the found node or NULL if an error occurs or node is not found.
xmlNodePtr xmlSecFindNode(const xmlNodePtr parent, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Searches child nodes by name and namespace.
Searches all children of the parent node having given name and namespace href.
Parameters:
-
parent— the pointer to XML node. -
name— the name. -
ns— the namespace href (may be NULL).
Returns: the pointer to the found node or NULL if an error occurs or node is not found.
xmlNodePtr xmlSecAddChild(xmlNodePtr parent, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Adds a new child element with the given name and namespace.
Adds a child to the node parent with given name and namespace ns.
Parameters:
-
parent— the pointer to an XML node. -
name— the new node name. -
ns— the new node namespace.
Returns: pointer to the new node or NULL if an error occurs.
xmlNodePtr xmlSecEnsureEmptyChild(xmlNodePtr parent, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Finds or creates an empty child element by name and namespace.
Searches a direct child of the parent node having given name and namespace href. If not found then element node with given name / namespace is added.
Parameters:
-
parent— the pointer to XML node. -
name— the name. -
ns— the namespace href (may be NULL).
Returns: the pointer to the found or created node; or NULL if an error occurs.
xmlNodePtr xmlSecAddChildNode(xmlNodePtr parent, xmlNodePtr child);Source: include/xmlsec/xmltree.h
Adds child node to the parent node.
Parameters:
-
parent— the pointer to an XML node. -
child— the new node.
Returns: pointer to the new node or NULL if an error occurs.
xmlNodePtr xmlSecAddNextSibling(xmlNodePtr node, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Adds a new next-sibling element with the given name and namespace.
Adds next sibling to the node node with given name and namespace ns.
Parameters:
-
node— the pointer to an XML node. -
name— the new node name. -
ns— the new node namespace.
Returns: pointer to the new node or NULL if an error occurs.
xmlNodePtr xmlSecAddPrevSibling(xmlNodePtr node, const xmlChar *name, const xmlChar *ns);Source: include/xmlsec/xmltree.h
Adds a new previous-sibling element with the given name and namespace.
Adds prev sibling to the node node with given name and namespace ns.
Parameters:
-
node— the pointer to an XML node. -
name— the new node name. -
ns— the new node namespace.
Returns: pointer to the new node or NULL if an error occurs.
int xmlSecReplaceNode(xmlNodePtr node, xmlNodePtr newNode);Source: include/xmlsec/xmltree.h
Swaps a node with a new node in the XML tree.
Swaps the node and newNode in the XML tree.
Parameters:
-
node— the current node. -
newNode— the new node.
Returns: 0 on success or a negative value if an error occurs.
int xmlSecReplaceNodeAndReturn(xmlNodePtr node, xmlNodePtr newNode, xmlNodePtr *replaced);Source: include/xmlsec/xmltree.h
Swaps a node with another and optionally returns the replaced node.
Swaps the node and newNode in the XML tree.
Parameters:
-
node— the current node. -
newNode— the new node. -
replaced— the replaced node, or release it if NULL is given
Returns: 0 on success or a negative value if an error occurs.
int xmlSecReplaceContent(xmlNodePtr node, xmlNodePtr newNode);Source: include/xmlsec/xmltree.h
Swaps the content of node and newNode.
Parameters:
-
node— the current node. -
newNode— the new node.
Returns: 0 on success or a negative value if an error occurs.
int xmlSecReplaceContentAndReturn(xmlNodePtr node, xmlNodePtr newNode, xmlNodePtr *replaced);Source: include/xmlsec/xmltree.h
Swaps the content of node and newNode, optionally returning replaced nodes.
Parameters:
-
node— the current node. -
newNode— the new node. -
replaced— the replaced nodes, or release them if NULL is given
Returns: 0 on success or a negative value if an error occurs.
int xmlSecReplaceNodeBuffer(xmlNodePtr node, const xmlSecByte *buffer, xmlSecSize size);Source: include/xmlsec/xmltree.h
Replaces a node with parsed XML data from a buffer.
Swaps the node and the parsed XML data from the buffer in the XML tree.
Parameters:
-
node— the current node. -
buffer— the XML data. -
size— the XML data size.
Returns: 0 on success or a negative value if an error occurs.
int xmlSecReplaceNodeBufferAndReturn(xmlNodePtr node, const xmlSecByte *buffer, xmlSecSize size, xmlNodePtr *replaced);Source: include/xmlsec/xmltree.h
Replaces a node with parsed XML data from a buffer, optionally returning replaced nodes.
Swaps the node and the parsed XML data from the buffer in the XML tree.
Parameters:
-
node— the current node. -
buffer— the XML data. -
size— the XML data size. -
replaced— the replaced nodes, or release them if NULL is given
Returns: 0 on success or a negative value if an error occurs.
int xmlSecNodeEncodeAndSetContent(xmlNodePtr node, const xmlChar *buffer);Source: include/xmlsec/xmltree.h
Encodes special characters in a buffer and sets it as node content.
Encodes "special" characters in the buffer and sets the result as the node content.
Parameters:
-
node— the pointer to an XML node. -
buffer— the pointer to the node content.
Returns: 0 on success or a negative value if an error occurs.
void xmlSecAddIDs(xmlDocPtr doc, xmlNodePtr node, const xmlChar **ids);Source: include/xmlsec/xmltree.h
Registers ID attributes from a node subtree in the document's ID table.
Walks thru all children of the node and adds all attributes from the ids list to the doc document IDs attributes hash.
Parameters:
-
doc— the pointer to an XML document. -
node— the pointer to an XML node. -
ids— the pointer to a NULL terminated list of ID attributes.
xmlDocPtr xmlSecCreateTree(const xmlChar *rootNodeName, const xmlChar *rootNodeNs);Source: include/xmlsec/xmltree.h
Creates a new XML document with a single root node.
Creates a new XML tree with one root node rootNodeName.
Parameters:
-
rootNodeName— the root node name. -
rootNodeNs— the root node namespace (optional).
Returns: pointer to the newly created tree or NULL if an error occurs.
int xmlSecIsEmptyNode(xmlNodePtr node);Source: include/xmlsec/xmltree.h
Checks whether a node is empty (whitespace only).
Checks whether the node is empty (i.e. has only whitespaces children).
Parameters:
-
node— the node to check
Returns: 1 if node is empty, 0 otherwise or a negative value if an error occurs.
int xmlSecIsEmptyString(const xmlChar *str);Source: include/xmlsec/xmltree.h
Checks whether a string contains only whitespace.
Checks whether the str is empty (i.e. has only whitespaces children).
Parameters:
-
str— the string to check
Returns: 1 if str is empty, 0 otherwise or a negative value if an error occurs.
xmlChar * xmlSecGetQName(xmlNodePtr node, const xmlChar *href, const xmlChar *local);Source: include/xmlsec/xmltree.h
Creates a QName string from a namespace href and a local name.
Creates QName (prefix:local) from href and local in the context of the node. Caller is responsible for freeing returned string with xmlFree.
Parameters:
-
node— the context node. -
href— the QName href (can be NULL). -
local— the QName local part.
Returns: qname or NULL if an error occurs.
int xmlSecDepthFirstTreeWalk(xmlNodePtr node, xmlSecTreeWalkCallback callback, void *data);Source: include/xmlsec/xmltree.h
Walks thru the XML tree and calls a callback for each node.
Walks thru the XML tree starting from node and calls callback for each node. The callback is called with the current node and data as parameters and should return 1 to continue the walk, 0 to stop the walk, or a negative value to stop the walk with an error.
Parameters:
-
node— the pointer to an XML node to start the walk from. -
callback— the callback function to call for each node. -
data— the pointer to data to pass to the callback function.
Returns: 0 on success or a negative value if an error occurs.
int xmlSecPrintXmlString(FILE *fd, const xmlChar *str);Source: include/xmlsec/xmltree.h
Encodes an XML string and writes it to a file descriptor.
Encodes the str (e.g. replaces '&' with '&') and writes it to fd.
Parameters:
-
fd— the file descriptor to write the XML string to -
str— the string
Returns: he number of bytes transmitted or a negative value if an error occurs.
xmlSecQName2IntegerInfoConstPtr xmlSecQName2IntegerGetInfo(xmlSecQName2IntegerInfoConstPtr info, int intValue);Source: include/xmlsec/xmltree.h
Maps integer intValue to a QName prefix.
Parameters:
-
info— the qname<->integer mapping information. -
intValue— the integer value.
Returns: the QName info that is mapped to intValue or NULL if such value is not found.
int xmlSecQName2IntegerGetInteger(xmlSecQName2IntegerInfoConstPtr info, const xmlChar *qnameHref, const xmlChar *qnameLocalPart, int *intValue);Source: include/xmlsec/xmltree.h
Maps a QName to an integer value.
Maps qname qname to an integer and returns it in intValue.
Parameters:
-
info— the qname<->integer mapping information. -
qnameHref— the qname href value. -
qnameLocalPart— the qname local part value. -
intValue— the pointer to result integer value.
Returns: 0 on success or a negative value if an error occurs,
int xmlSecQName2IntegerGetIntegerFromString(xmlSecQName2IntegerInfoConstPtr info, xmlNodePtr node, const xmlChar *qname, int *intValue);Source: include/xmlsec/xmltree.h
Converts a QName string to an integer value.
Converts qname into integer in context of node.
Parameters:
-
info— the qname<->integer mapping information. -
node— the pointer to node. -
qname— the qname string. -
intValue— the pointer to result integer value.
Returns: 0 on success or a negative value if an error occurs,
xmlChar * xmlSecQName2IntegerGetStringFromInteger(xmlSecQName2IntegerInfoConstPtr info, xmlNodePtr node, int intValue);Source: include/xmlsec/xmltree.h
Creates a QName string from an integer value.
Creates qname string for intValue in context of given node. Caller is responsible for freeing returned string with xmlFree.
Parameters:
-
info— the qname<->integer mapping information. -
node— the pointer to node. -
intValue— the integer value.
Returns: pointer to newly allocated string on success or NULL if an error occurs,
int xmlSecQName2IntegerNodeRead(xmlSecQName2IntegerInfoConstPtr info, xmlNodePtr node, int *intValue);Source: include/xmlsec/xmltree.h
Reads a node's content and converts it to an integer using QName mapping.
Reads the content of node and converts it to an integer using mapping from info.
Parameters:
-
info— the qname<->integer mapping information. -
node— the pointer to node. -
intValue— the pointer to result integer value.
Returns: 0 on success or a negative value if an error occurs,
int xmlSecQName2IntegerNodeWrite(xmlSecQName2IntegerInfoConstPtr info, xmlNodePtr node, const xmlChar *nodeName, const xmlChar *nodeNs, int intValue);Source: include/xmlsec/xmltree.h
Creates a child node holding a QName string for an integer value.
Creates new child node in node and sets its value to intValue.
Parameters:
-
info— the qname<->integer mapping information. -
node— the parent node. -
nodeName— the child node name. -
nodeNs— the child node namespace. -
intValue— the integer value.
Returns: 0 on success or a negative value if an error occurs,
int xmlSecQName2IntegerAttributeRead(xmlSecQName2IntegerInfoConstPtr info, xmlNodePtr node, const xmlChar *attrName, int *intValue);Source: include/xmlsec/xmltree.h
Reads an attribute's QName value and converts it to an integer.
Gets the value of attrName atrtibute from node and converts it to integer according to info.
Parameters:
-
info— the qname<->integer mapping information. -
node— the element node. -
attrName— the attribute name. -
intValue— the pointer to result integer value.
Returns: 0 on success or a negative value if an error occurs,
int xmlSecQName2IntegerAttributeWrite(xmlSecQName2IntegerInfoConstPtr info, xmlNodePtr node, const xmlChar *attrName, int intValue);Source: include/xmlsec/xmltree.h
Converts an integer to a QName and sets it as an attribute value.
Converts intValue to a qname and sets it to the value of attribute attrName in node.
Parameters:
-
info— the qname<->integer mapping information. -
node— the parent node. -
attrName— the name of attribute. -
intValue— the integer value.
Returns: 0 on success or a negative value if an error occurs,
void xmlSecQName2IntegerDebugDump(xmlSecQName2IntegerInfoConstPtr info, int intValue, const xmlChar *name, FILE *output);Source: include/xmlsec/xmltree.h
Prints intValue into output.
Parameters:
-
info— the qname<->integer mapping information. -
intValue— the integer value. -
name— the value name to print. -
output— the pointer to output FILE.
void xmlSecQName2IntegerDebugXmlDump(xmlSecQName2IntegerInfoConstPtr info, int intValue, const xmlChar *name, FILE *output);Source: include/xmlsec/xmltree.h
Prints intValue into output in XML format.
Parameters:
-
info— the qname<->integer mapping information. -
intValue— the integer value. -
name— the value name to print. -
output— the pointer to output FILE.
xmlSecQName2BitMaskInfoConstPtr xmlSecQName2BitMaskGetInfo(xmlSecQName2BitMaskInfoConstPtr info, xmlSecBitMask mask);Source: include/xmlsec/xmltree.h
Converts mask to qname.
Parameters:
-
info— the qname<->bit mask mapping information. -
mask— the bit mask.
Returns: pointer to the qname info for mask or NULL if mask is unknown.
int xmlSecQName2BitMaskGetBitMask(xmlSecQName2BitMaskInfoConstPtr info, const xmlChar *qnameLocalPart, const xmlChar *qnameHref, xmlSecBitMask *mask);Source: include/xmlsec/xmltree.h
Converts qnameLocalPart to mask.
Parameters:
-
info— the qname<->bit mask mapping information. -
qnameHref— the qname Href value. -
qnameLocalPart— the qname LocalPart value. -
mask— the pointer to result mask.
Returns: 0 on success or a negative value if an error occurs,
int xmlSecQName2BitMaskNodesRead(xmlSecQName2BitMaskInfoConstPtr info, xmlNodePtr *node, const xmlChar *nodeName, const xmlChar *nodeNs, int stopOnUnknown, xmlSecBitMask *mask);Source: include/xmlsec/xmltree.h
Reads QName elements and accumulates their values into a bit mask.
Reads <nodeNs: and puts the result bit mask into mask. When function exits, node points to the first element node after all the <nodeNs:.
Parameters:
-
info— the qname<->bit mask mapping information. -
node— the start. -
nodeName— the mask nodes name. -
nodeNs— the mask nodes namespace. -
stopOnUnknown— if this flag is set then function exits if unknown value was found. -
mask— the pointer to result mask.
Returns: 0 on success or a negative value if an error occurs,
int xmlSecQName2BitMaskGetBitMaskFromString(xmlSecQName2BitMaskInfoConstPtr info, xmlNodePtr node, const xmlChar *qname, xmlSecBitMask *mask);Source: include/xmlsec/xmltree.h
Converts a QName string to a bit mask value.
Converts qname into integer in context of node.
Parameters:
-
info— the qname<->integer mapping information. -
node— the pointer to node. -
qname— the qname string. -
mask— the pointer to result msk value.
Returns: 0 on success or a negative value if an error occurs,
xmlChar * xmlSecQName2BitMaskGetStringFromBitMask(xmlSecQName2BitMaskInfoConstPtr info, xmlNodePtr node, xmlSecBitMask mask);Source: include/xmlsec/xmltree.h
Creates a QName string from a bit mask value.
Creates qname string for mask in context of given node. Caller is responsible for freeing returned string with xmlFree.
Parameters:
-
info— the qname<->integer mapping information. -
node— the pointer to node. -
mask— the mask.
Returns: pointer to newly allocated string on success or NULL if an error occurs,
int xmlSecQName2BitMaskNodesWrite(xmlSecQName2BitMaskInfoConstPtr info, xmlNodePtr node, const xmlChar *nodeName, const xmlChar *nodeNs, xmlSecBitMask mask);Source: include/xmlsec/xmltree.h
Writes bit mask values as QName child elements.
Writes <nodeNs: with values from mask to node.
Parameters:
-
info— the qname<->bit mask mapping information. -
node— the parent element for mask nodes. -
nodeName— the mask nodes name. -
nodeNs— the mask nodes namespace. -
mask— the bit mask.
Returns: 0 on success or a negative value if an error occurs,
void xmlSecQName2BitMaskDebugDump(xmlSecQName2BitMaskInfoConstPtr info, xmlSecBitMask mask, const xmlChar *name, FILE *output);Source: include/xmlsec/xmltree.h
Prints debug information about a bit mask.
Prints debug information about mask to output.
Parameters:
-
info— the qname<->bit mask mapping information. -
mask— the bit mask. -
name— the value name to print. -
output— the pointer to output FILE.
void xmlSecQName2BitMaskDebugXmlDump(xmlSecQName2BitMaskInfoConstPtr info, xmlSecBitMask mask, const xmlChar *name, FILE *output);Source: include/xmlsec/xmltree.h
Prints debug information about a bit mask in XML format.
Prints debug information about mask to output in XML format.
Parameters:
-
info— the qname<->bit mask mapping information. -
mask— the bit mask. -
name— the value name to print. -
output— the pointer to output FILE.
wchar_t * xmlSecWin32ConvertLocaleToUnicode(const char *str);Source: include/xmlsec/xmltree.h
Converts input string from current system locale to Unicode.
Parameters:
-
str— the string to convert.
Returns: a pointer to newly allocated string (must be freed with xmlFree) or NULL if an error occurs.
wchar_t * xmlSecWin32ConvertUtf8ToUnicode(const xmlChar *str);Source: include/xmlsec/xmltree.h
Converts input string from UTF8 to Unicode.
Parameters:
-
str— the string to convert.
Returns: a pointer to newly allocated string (must be freed with xmlFree) or NULL if an error occurs.
xmlChar * xmlSecWin32ConvertUnicodeToUtf8(const \ wchar_t *str);Source: include/xmlsec/xmltree.h
Converts input string from Unicode to UTF8.
Parameters:
-
str— the string to convert.
Returns: a pointer to newly allocated string (must be freed with xmlFree) or NULL if an error occurs.
xmlChar * xmlSecWin32ConvertLocaleToUtf8(const char *str);Source: include/xmlsec/xmltree.h
Converts input string from locale to UTF8.
Parameters:
-
str— the string to convert.
Returns: a pointer to newly allocated string (must be freed with xmlFree) or NULL if an error occurs.
char * xmlSecWin32ConvertUtf8ToLocale(const xmlChar *str);Source: include/xmlsec/xmltree.h
Converts input string from UTF8 to locale.
Parameters:
-
str— the string to convert.
Returns: a pointer to newly allocated string (must be freed with xmlFree) or NULL if an error occurs.
xmlChar * xmlSecWin32ConvertTstrToUtf8(const \ char *str);Source: include/xmlsec/xmltree.h
Converts a TSTR string (locale or Unicode) to UTF-8.
Converts input string from TSTR (locale or Unicode) to UTF8.
Parameters:
-
str— the string to convert.
Returns: a pointer to newly allocated string (must be freed with xmlFree) or NULL if an error occurs.
char * xmlSecWin32ConvertUtf8ToTstr(const xmlChar *str);Source: include/xmlsec/xmltree.h
Converts a UTF-8 string to TSTR (locale or Unicode).
Converts input string from UTF8 to TSTR (locale or Unicode).
Parameters:
-
str— the string to convert.
Returns: a pointer to newly allocated string (must be freed with xmlFree) or NULL if an error occurs.