Top |
struct | xmlSecQName2IntegerInfo |
typedef | xmlSecQName2IntegerInfoConstPtr |
typedef | xmlSecBitMask |
struct | xmlSecQName2BitMaskInfo |
typedef | xmlSecQName2BitMaskInfoConstPtr |
const xmlChar *
xmlSecGetDefaultLineFeed (void
);
Gets the current default linefeed.
void
xmlSecSetDefaultLineFeed (const xmlChar *linefeed
);
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.
const xmlChar *
xmlSecGetNodeNsHref (const xmlNodePtr cur
);
Get's node's namespace href.
int xmlSecCheckNodeName (const xmlNodePtr cur
,const xmlChar *name
,const xmlChar *ns
);
Checks that the node has a given name and a given namespace href.
xmlNodePtr
xmlSecGetNextElementNode (xmlNodePtr cur
);
Seraches for the next element node.
xmlNodePtr xmlSecFindSibling (const xmlNodePtr cur
,const xmlChar *name
,const xmlChar *ns
);
Searches cur
and the next siblings of the cur
node having given name and
namespace href.
xmlNodePtr xmlSecFindChild (const xmlNodePtr parent
,const xmlChar *name
,const xmlChar *ns
);
Searches a direct child of the parent
node having given name and
namespace href.
xmlNodePtr xmlSecFindParent (const xmlNodePtr cur
,const xmlChar *name
,const xmlChar *ns
);
Searches the ancestors axis of the cur
node for a node having given name
and namespace href.
xmlNodePtr xmlSecFindNode (const xmlNodePtr parent
,const xmlChar *name
,const xmlChar *ns
);
Searches all children of the parent
node having given name and
namespace href.
xmlNodePtr xmlSecAddChild (xmlNodePtr parent
,const xmlChar *name
,const xmlChar *ns
);
Adds a child to the node parent
with given name
and namespace ns
.
xmlNodePtr xmlSecEnsureEmptyChild (xmlNodePtr parent
,const xmlChar *name
,const xmlChar *ns
);
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.
xmlNodePtr xmlSecAddChildNode (xmlNodePtr parent
,xmlNodePtr child
);
Adds child
node to the parent
node.
xmlNodePtr xmlSecAddNextSibling (xmlNodePtr node
,const xmlChar *name
,const xmlChar *ns
);
Adds next sibling to the node node
with given name
and namespace ns
.
xmlNodePtr xmlSecAddPrevSibling (xmlNodePtr node
,const xmlChar *name
,const xmlChar *ns
);
Adds prev sibling to the node node
with given name
and namespace ns
.
int xmlSecReplaceNode (xmlNodePtr node
,xmlNodePtr newNode
);
Swaps the node
and newNode
in the XML tree.
int xmlSecReplaceNodeAndReturn (xmlNodePtr node
,xmlNodePtr newNode
,xmlNodePtr *replaced
);
Swaps the node
and newNode
in the XML tree.
int xmlSecReplaceContent (xmlNodePtr node
,xmlNodePtr newNode
);
Swaps the content of node
and newNode
.
int xmlSecReplaceContentAndReturn (xmlNodePtr node
,xmlNodePtr newNode
,xmlNodePtr *replaced
);
Swaps the content of node
and newNode
.
int xmlSecReplaceNodeBuffer (xmlNodePtr node
,const xmlSecByte *buffer
,xmlSecSize size
);
Swaps the node
and the parsed XML data from the buffer
in the XML tree.
int xmlSecReplaceNodeBufferAndReturn (xmlNodePtr node
,const xmlSecByte *buffer
,xmlSecSize size
,xmlNodePtr *replaced
);
Swaps the node
and the parsed XML data from the buffer
in the XML tree.
int xmlSecNodeEncodeAndSetContent (xmlNodePtr node
,const xmlChar *buffer
);
Encodes "special" characters in the buffer
and sets the result
as the node content.
void xmlSecAddIDs (xmlDocPtr doc
,xmlNodePtr cur
,const xmlChar **ids
);
Walks thru all children of the cur
node and adds all attributes
from the ids
list to the doc
document IDs attributes hash.
xmlDocPtr xmlSecCreateTree (const xmlChar *rootNodeName
,const xmlChar *rootNodeNs
);
Creates a new XML tree with one root node rootNodeName
.
int
xmlSecIsEmptyNode (xmlNodePtr node
);
Checks whether the node
is empty (i.e. has only whitespaces children).
int
xmlSecIsEmptyString (const xmlChar *str
);
Checks whether the str
is empty (i.e. has only whitespaces children).
xmlChar * xmlSecGetQName (xmlNodePtr node
,const xmlChar *href
,const xmlChar *local
);
Creates QName (prefix:local) from href
and local
in the context of the node
.
Caller is responsible for freeing returned string with xmlFree.
int xmlSecPrintXmlString (FILE *fd
,const xmlChar *str
);
Encodes the str
(e.g. replaces '&' with '&') and writes it to fd
.
xmlSecQName2IntegerInfoConstPtr xmlSecQName2IntegerGetInfo (xmlSecQName2IntegerInfoConstPtr info
,int intValue
);
Maps integer intValue
to a QName prefix.
int xmlSecQName2IntegerGetInteger (xmlSecQName2IntegerInfoConstPtr info
,const xmlChar *qnameHref
,const xmlChar *qnameLocalPart
,int *intValue
);
Maps qname qname to an integer and returns it in intValue
.
int xmlSecQName2IntegerGetIntegerFromString (xmlSecQName2IntegerInfoConstPtr info
,xmlNodePtr node
,const xmlChar *qname
,int *intValue
);
Converts qname
into integer in context of node
.
xmlChar * xmlSecQName2IntegerGetStringFromInteger (xmlSecQName2IntegerInfoConstPtr info
,xmlNodePtr node
,int intValue
);
Creates qname string for intValue
in context of given node
. Caller
is responsible for freeing returned string with xmlFree
.
int xmlSecQName2IntegerNodeRead (xmlSecQName2IntegerInfoConstPtr info
,xmlNodePtr node
,int *intValue
);
Reads the content of node
and converts it to an integer using mapping
from info
.
int xmlSecQName2IntegerNodeWrite (xmlSecQName2IntegerInfoConstPtr info
,xmlNodePtr node
,const xmlChar *nodeName
,const xmlChar *nodeNs
,int intValue
);
Creates new child node in node
and sets its value to intValue
.
int xmlSecQName2IntegerAttributeRead (xmlSecQName2IntegerInfoConstPtr info
,xmlNodePtr node
,const xmlChar *attrName
,int *intValue
);
Gets the value of attrName
atrtibute from node
and converts it to integer
according to info
.
int xmlSecQName2IntegerAttributeWrite (xmlSecQName2IntegerInfoConstPtr info
,xmlNodePtr node
,const xmlChar *attrName
,int intValue
);
Converts intValue
to a qname and sets it to the value of
attribute attrName
in node
.
void xmlSecQName2IntegerDebugDump (xmlSecQName2IntegerInfoConstPtr info
,int intValue
,const xmlChar *name
,FILE *output
);
Prints intValue
into output
.
void xmlSecQName2IntegerDebugXmlDump (xmlSecQName2IntegerInfoConstPtr info
,int intValue
,const xmlChar *name
,FILE *output
);
Prints intValue
into output
in XML format.
xmlSecQName2BitMaskInfoConstPtr xmlSecQName2BitMaskGetInfo (xmlSecQName2BitMaskInfoConstPtr info
,xmlSecBitMask mask
);
Converts mask
to qname.
int xmlSecQName2BitMaskGetBitMask (xmlSecQName2BitMaskInfoConstPtr info
,const xmlChar *qnameLocalPart
,const xmlChar *qnameHref
,xmlSecBitMask *mask
);
Converts qnameLocalPart
to mask
.
int xmlSecQName2BitMaskNodesRead (xmlSecQName2BitMaskInfoConstPtr info
,xmlNodePtr *node
,const xmlChar *nodeName
,const xmlChar *nodeNs
,int stopOnUnknown
,xmlSecBitMask *mask
);
Reads <nodeNs
:nodeName
> elements and puts the result bit mask
into mask
. When function exits, node
points to the first element node
after all the <nodeNs
:nodeName
> elements.
int xmlSecQName2BitMaskGetBitMaskFromString (xmlSecQName2BitMaskInfoConstPtr info
,xmlNodePtr node
,const xmlChar *qname
,xmlSecBitMask *mask
);
Converts qname
into integer in context of node
.
xmlChar * xmlSecQName2BitMaskGetStringFromBitMask (xmlSecQName2BitMaskInfoConstPtr info
,xmlNodePtr node
,xmlSecBitMask mask
);
Creates qname string for mask
in context of given node
. Caller
is responsible for freeing returned string with xmlFree
.
int xmlSecQName2BitMaskNodesWrite (xmlSecQName2BitMaskInfoConstPtr info
,xmlNodePtr node
,const xmlChar *nodeName
,const xmlChar *nodeNs
,xmlSecBitMask mask
);
Writes <nodeNs
:nodeName
> elemnts with values from mask
to node
.
void xmlSecQName2BitMaskDebugDump (xmlSecQName2BitMaskInfoConstPtr info
,xmlSecBitMask mask
,const xmlChar *name
,FILE *output
);
Prints debug information about mask
to output
.
void xmlSecQName2BitMaskDebugXmlDump (xmlSecQName2BitMaskInfoConstPtr info
,xmlSecBitMask mask
,const xmlChar *name
,FILE *output
);
Prints debug information about mask
to output
in XML format.
LPWSTR
xmlSecWin32ConvertLocaleToUnicode (const char *str
);
Converts input string from current system locale to Unicode.
LPWSTR
xmlSecWin32ConvertUtf8ToUnicode (const xmlChar *str
);
Converts input string from UTF8 to Unicode.
xmlChar *
xmlSecWin32ConvertUnicodeToUtf8 (LPCWSTR str
);
Converts input string from Unicode to UTF8.
xmlChar *
xmlSecWin32ConvertLocaleToUtf8 (const char *str
);
Converts input string from locale to UTF8.
char *
xmlSecWin32ConvertUtf8ToLocale (const xmlChar *str
);
Converts input string from UTF8 to locale.
xmlChar *
xmlSecWin32ConvertTstrToUtf8 (LPCTSTR str
);
Converts input string from TSTR (locale or Unicode) to UTF8.
struct xmlSecQName2IntegerInfo { const xmlChar* qnameHref; const xmlChar* qnameLocalPart; int intValue; };
QName <-> Integer conversion definition.
typedef const xmlSecQName2IntegerInfo * xmlSecQName2IntegerInfoConstPtr;
Pointer to constant QName <-> Integer conversion definition.
struct xmlSecQName2BitMaskInfo { const xmlChar* qnameHref; const xmlChar* qnameLocalPart; xmlSecBitMask mask; };
QName <-> Bitmask conversion definition.