--- embedaddon/libxml2/doc/devhelp/libxml2-tree.html 2013/07/22 01:22:25 1.1.1.2 +++ embedaddon/libxml2/doc/devhelp/libxml2-tree.html 2014/06/15 19:53:35 1.1.1.3 @@ -44,15 +44,16 @@
#define XML_LOCAL_NAMESPACE; -#define XML_XML_NAMESPACE; +#define BASE_BUFFER_SIZE; #define XML_XML_ID; #define xmlRootNode; #define XML_GET_LINE; #define XML_GET_CONTENT; #define xmlChildrenNode; -#define BASE_BUFFER_SIZE; +#define XML_XML_NAMESPACE; +#define LIBXML2_NEW_BUFFER; typedef struct _xmlNs xmlNs; -typedef xmlBuffer * xmlBufferPtr; +typedef struct _xmlElementContent xmlElementContent; typedef xmlEnumeration * xmlEnumerationPtr; typedef struct _xmlBuffer xmlBuffer; typedef xmlParserInput * xmlParserInputPtr; @@ -63,7 +64,7 @@ typedef xml typedef enum xmlBufferAllocationScheme; typedef struct _xmlNode xmlNode; typedef xmlDoc * xmlDocPtr; -typedef struct _xmlElementContent xmlElementContent; +typedef xmlBuffer * xmlBufferPtr; typedef xmlDOMWrapCtxt * xmlDOMWrapCtxtPtr; typedef xmlRef * xmlRefPtr; typedef struct _xmlParserInputBuffer xmlParserInputBuffer; @@ -73,6 +74,7 @@ typedef xmlNodexmlParserCtxt; typedef xmlDtd * xmlDtdPtr; typedef enum xmlAttributeDefault; +typedef struct _xmlBuf xmlBuf; typedef struct _xmlNotation xmlNotation; typedef enum xmlElementType; typedef struct _xmlEntity xmlEntity; @@ -81,6 +83,7 @@ typedef xmlAt typedef enum xmlElementTypeVal; typedef xmlNotation * xmlNotationPtr; typedef xmlElement * xmlElementPtr; +typedef xmlBuf * xmlBufPtr; typedef enum xmlElementContentOccur; typedef xmlAttr * xmlAttrPtr; typedef struct _xmlDoc xmlDoc; @@ -104,8 +107,9 @@ typedef xm typedef xmlSAXHandler * xmlSAXHandlerPtr; xmlNodePtr xmlDocCopyNode (const xmlNodePtr node,
xmlDocPtr doc,
int extended); xmlNodePtr xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); -xmlChar * xmlGetProp (xmlNodePtr node,
const xmlChar * name); +xmlChar * xmlBufContent (const xmlBufPtr buf); xmlAttrPtr xmlNewNsPropEatName (xmlNodePtr node,
xmlNsPtr ns,
xmlChar * name,
const xmlChar * value); +xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar * value); xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar * content,
int len); void xmlBufferWriteCHAR (xmlBufferPtr buf,
const xmlChar * string); xmlChar * xmlNodeGetBase (xmlDocPtr doc,
xmlNodePtr cur); @@ -117,15 +121,16 @@ int xmlSaveFormatFileE xmlBufferPtr xmlBufferCreate (void); xmlNodePtr xmlNewDocFragment (xmlDocPtr doc); xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc); -xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar * value); +xmlChar * xmlGetProp (xmlNodePtr node,
const xmlChar * name); int xmlValidateName (const xmlChar * value,
int space); -void xmlSetBufferAllocationScheme (xmlBufferAllocationScheme scheme); +xmlChar * xmlBufEnd (const xmlBufPtr buf); int xmlValidateQName (const xmlChar * value,
int space); xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * nameSpace); xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem); int xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar * str,
int len); xmlNodePtr xmlNewPI (const xmlChar * name,
const xmlChar * content); void xmlDocDumpFormatMemoryEnc (xmlDocPtr out_doc,
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding,
int format); +xmlAttrPtr xmlSetProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * value); unsigned long xmlChildElementCount (xmlNodePtr parent); void xmlElemDump (FILE * f,
xmlDocPtr doc,
xmlNodePtr cur); int xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char * encoding,
int format); @@ -171,6 +176,7 @@ int xmlBufferDump (FILE xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
int recursive); xmlDOMWrapCtxtPtr xmlDOMWrapNewCtxt (void); void xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar ** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding); +int xmlBufGetNodeContent (xmlBufPtr buf,
xmlNodePtr cur); xmlNodePtr xmlTextMerge (xmlNodePtr first,
xmlNodePtr second); void xmlDocDumpMemory (xmlDocPtr cur,
xmlChar ** mem,
int * size); xmlNodePtr xmlNewDocPI (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * content); @@ -194,6 +200,7 @@ void xmlSetDocCompres void xmlUnlinkNode (xmlNodePtr cur); const xmlChar * xmlSplitQName3 (const xmlChar * name,
int * len); typedef xmlNsPtr xmlDOMWrapAcquireNsFunction (xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr node,
const xmlChar * nsName,
const xmlChar * nsPrefix); +size_t xmlBufUse (const xmlBufPtr buf); xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root); long xmlGetLineNo (xmlNodePtr node); const xmlChar * xmlBufferContent (const xmlBufferPtr buf); @@ -201,6 +208,7 @@ int xmlRemoveProp (xmlNodePtr xmlLastElementChild (xmlNodePtr parent); xmlChar * xmlNodeGetLang (xmlNodePtr cur); int xmlGetDocCompressMode (xmlDocPtr doc); +size_t xmlBufNodeDump (xmlBufPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format); xmlChar * xmlGetNsProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * nameSpace); xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
const xmlChar * name,
const xmlChar * value); void xmlFreeNode (xmlNodePtr cur); @@ -245,12 +253,13 @@ int xmlBufferCCat (xmlNsPtr * xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node); int xmlBufferGrow (xmlBufferPtr buf,
unsigned int len); int xmlNodeIsText (xmlNodePtr node); -xmlAttrPtr xmlSetProp (xmlNodePtr node,
const xmlChar * name,
const xmlChar * value); +void xmlSetBufferAllocationScheme (xmlBufferAllocationScheme scheme); int xmlIsXHTML (const xmlChar * systemID,
const xmlChar * publicID); void xmlNodeSetLang (xmlNodePtr cur,
const xmlChar * lang); void xmlFreeDtd (xmlDtdPtr cur); void xmlFreeNodeList (xmlNodePtr cur); void xmlFreeDoc (xmlDocPtr cur); +size_t xmlBufShrink (xmlBufPtr buf,
size_t len); xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * content); int xmlSaveFileEnc (const char * filename,
xmlDocPtr cur,
const char * encoding); xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar * name,
const xmlChar * value); @@ -273,6 +282,10 @@ void xmlFreeNsList (default buffer size 4000.
#define LIBXML2_NEW_BUFFER; +
Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0.
+struct _xmlBuf { +The content of this structure is not made public by the API. +} xmlBuf; ++
xmlBuf * xmlBufPtr; +
A pointer to a buffer structure, the actual structure internals are not public
+struct _xmlBuffer { xmlChar * content : The buffer content UTF8 unsigned int use : The buffer size used @@ -688,8 +711,8 @@ void xmlFreeNsList (xmlOutputWriteCallback writecallback xmlOutputCloseCallback closecallback xmlCharEncodingHandlerPtr encoder : I18N conversions to UTF-8 - xmlBufferPtr buffer : Local buffer encoded in UTF-8 or ISOLatin - xmlBufferPtr conv : if encoder != NULL buffer for output + xmlBufPtr buffer : Local buffer encoded in UTF-8 or ISOLatin + xmlBufPtr conv : if encoder != NULL buffer for output int written : total number of byte written int error } xmlOutputBuffer; @@ -789,6 +812,7 @@ void xmlFreeNsList (xmlParserNodeInfo * nodeInfoTab : array of nodeInfos int input_id : we need to label inputs + unsigned long sizeentcopy : volume of entity copy } xmlParserCtxt;
Serialize text attribute values to an xml simple buffer
buf: | the XML buffer output |
doc: | the document |
attr: | the attribute node |
string: | the text content |
xmlChar * xmlBufContent (const xmlBufPtr buf)
+
Function to extract the content of a buffer
+buf: | the buffer |
Returns: | the internal content |
xmlChar * xmlBufEnd (const xmlBufPtr buf)
+
Function to extract the end of the content of a buffer
+buf: | the buffer |
Returns: | the end of the internal content or NULL in case of error |
int xmlBufGetNodeContent (xmlBufPtr buf,
xmlNodePtr cur)
+
Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value
+buf: | a buffer xmlBufPtr |
cur: | the node being read |
Returns: | 0 in case of success and -1 in case of error. |
size_t xmlBufNodeDump (xmlBufPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)
+
Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called
+buf: | the XML buffer output |
doc: | the document |
cur: | the current node |
level: | the imbrication level for indenting |
format: | is formatting allowed |
Returns: | the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error |
size_t xmlBufShrink (xmlBufPtr buf,
size_t len)
+
Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.
+buf: | the buffer to dump |
len: | the number of xmlChar to remove |
Returns: | the number of byte removed or 0 in case of failure |
size_t xmlBufUse (const xmlBufPtr buf)
+
Function to get the length of a buffer
+buf: | the buffer |
Returns: | the length of data in the internal content |
int xmlBufferAdd (xmlBufferPtr buf,
const xmlChar * str,
int len)
Add a string range to an XML buffer. if len == -1, the length of str is recomputed.
buf: | the buffer to dump |
str: | the #xmlChar string |
len: | the number of #xmlChar to add |
Returns: | 0 successful, a positive error code number otherwise and -1 in case of internal or API error. |
parent: | the parent node |
Returns: | the last child or NULL if none. |
long xmlGetLineNo (xmlNodePtr node)
-
Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)
+Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used
node: | valid node |
Returns: | the line number if successful, -1 otherwise |
xmlChar * xmlGetNoNsProp (xmlNodePtr node,
const xmlChar * name)
@@ -1352,7 +1400,7 @@ void xmlFreeNsList (
buffer: | a buffer |
cur: | the node being read |
Returns: | 0 in case of success and -1 in case of error. |
int xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format)
-
Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called
+Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.
buf: | the XML buffer output |
doc: | the document |
cur: | the current node |
level: | the imbrication level for indenting |
format: | is formatting allowed |
Returns: | the number of bytes written to the buffer or -1 in case of error |
void xmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char * encoding)
@@ -1497,7 +1545,7 @@ void xmlFreeNsList (+xmlSplitQName3 ()
const xmlChar * xmlSplitQName3 (const xmlChar * name,
int * len)
parse an XML qualified name string,i
-
name: the full QName len: an int * Returns: NULL if it is not a Qualified Name, otherwise, update len with the lenght in byte of the prefix and return a pointer to the start of the name without the prefix
name: the full QName len: an int * Returns: NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix
xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar * value)
Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.
@@ -1516,7 +1564,7 @@ void xmlFreeNsList (first: | the first text node |
second: | the second text node being merged |
Returns: | the first text node augmented |
void xmlUnlinkNode (xmlNodePtr cur)
-
Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it.
+Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.
cur: | the node |
int xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar * name)