libxml2 Reference Manual |
---|
globals - interface for all global variables of the library
all the global variables and thread handling for those variables is handled by this module. The bottom of this file is automatically generated by build_glob.py based on the description file global.data
Author(s): Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard
typedef struct _xmlGlobalState xmlGlobalState; typedef xmlGlobalState * xmlGlobalStatePtr; void xmlCleanupGlobals (void); xmlDeregisterNodeFunc xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func); typedef void xmlDeregisterNodeFunc (xmlNodePtr node); void xmlInitGlobals (void); void xmlInitializeGlobalState (xmlGlobalStatePtr gs); xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); typedef xmlOutputBufferPtr xmlOutputBufferCreateFilenameFunc (const char * URI,
xmlCharEncodingHandlerPtr encoder,
int compression); xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); typedef xmlParserInputBufferPtr xmlParserInputBufferCreateFilenameFunc (const char * URI,
xmlCharEncoding enc); xmlRegisterNodeFunc xmlRegisterNodeDefault (xmlRegisterNodeFunc func); typedef void xmlRegisterNodeFunc (xmlNodePtr node); xmlBufferAllocationScheme xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v); int xmlThrDefDefaultBufferSize (int v); xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault (xmlDeregisterNodeFunc func); int xmlThrDefDoValidityCheckingDefaultValue (int v); int xmlThrDefGetWarningsDefaultValue (int v); int xmlThrDefIndentTreeOutput (int v); int xmlThrDefKeepBlanksDefaultValue (int v); int xmlThrDefLineNumbersDefaultValue (int v); int xmlThrDefLoadExtDtdDefaultValue (int v); xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); int xmlThrDefParserDebugEntities (int v); xmlParserInputBufferCreateFilenameFunc xmlThrDefParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); int xmlThrDefPedanticParserDefaultValue (int v); xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault (xmlRegisterNodeFunc func); int xmlThrDefSaveNoEmptyTags (int v); void xmlThrDefSetGenericErrorFunc (void * ctx,
xmlGenericErrorFunc handler); void xmlThrDefSetStructuredErrorFunc (void * ctx,
xmlStructuredErrorFunc handler); int xmlThrDefSubstituteEntitiesDefaultValue (int v); const char * xmlThrDefTreeIndentString (const char * v);
struct _xmlGlobalState { const char * xmlParserVersion xmlSAXLocator xmlDefaultSAXLocator xmlSAXHandlerV1 xmlDefaultSAXHandler xmlSAXHandlerV1 docbDefaultSAXHandler : unused xmlSAXHandlerV1 htmlDefaultSAXHandler xmlFreeFunc xmlFree xmlMallocFunc xmlMalloc xmlStrdupFunc xmlMemStrdup xmlReallocFunc xmlRealloc xmlGenericErrorFunc xmlGenericError xmlStructuredErrorFunc xmlStructuredError void * xmlGenericErrorContext int oldXMLWDcompatibility xmlBufferAllocationScheme xmlBufferAllocScheme int xmlDefaultBufferSize int xmlSubstituteEntitiesDefaultValue int xmlDoValidityCheckingDefaultValue int xmlGetWarningsDefaultValue int xmlKeepBlanksDefaultValue int xmlLineNumbersDefaultValue int xmlLoadExtDtdDefaultValue int xmlParserDebugEntities int xmlPedanticParserDefaultValue int xmlSaveNoEmptyTags int xmlIndentTreeOutput const char * xmlTreeIndentString xmlRegisterNodeFunc xmlRegisterNodeDefaultValue xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue xmlMallocFunc xmlMallocAtomic xmlError xmlLastError xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue void * xmlStructuredErrorContext } xmlGlobalState;
xmlGlobalState * xmlGlobalStatePtr;
void xmlDeregisterNodeFunc (xmlNodePtr node)
Signature for the deregistration callback of a discarded node
node: | the current node |
xmlOutputBufferPtr xmlOutputBufferCreateFilenameFunc (const char * URI,
xmlCharEncodingHandlerPtr encoder,
int compression)
Signature for the function doing the lookup for a suitable output method corresponding to an URI.
URI: | the URI to write to |
encoder: | |
compression: | |
Returns: | the new xmlOutputBufferPtr in case of success or NULL if no method was found. |
xmlParserInputBufferPtr xmlParserInputBufferCreateFilenameFunc (const char * URI,
xmlCharEncoding enc)
Signature for the function doing the lookup for a suitable input method corresponding to an URI.
URI: | the URI to read from |
enc: | the requested source encoding |
Returns: | the new xmlParserInputBufferPtr in case of success or NULL if no method was found. |
void xmlRegisterNodeFunc (xmlNodePtr node)
Signature for the registration callback of a created node
node: | the current node |
xmlSAXHandlerV1 htmlDefaultSAXHandler;
DEPRECATED: This handler is unused and will be removed from future versions. Default old SAX v1 handler for HTML, builds the DOM tree
xmlBufferAllocationScheme xmlBufferAllocScheme;
DEPRECATED: Don't use. Global setting, default allocation policy for buffers, default is XML_BUFFER_ALLOC_EXACT
int xmlDefaultBufferSize;
DEPRECATED: Don't use. Global setting, default buffer size. Default value is BASE_BUFFER_SIZE
xmlSAXHandlerV1 xmlDefaultSAXHandler;
DEPRECATED: This handler is unused and will be removed from future versions. Default SAX version1 handler for XML, builds the DOM tree
xmlSAXLocator xmlDefaultSAXLocator;
DEPRECATED: Don't use The default SAX Locator { getPublicId, getSystemId, getLineNumber, getColumnNumber}
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
DEPRECATED: Don't use
int xmlDoValidityCheckingDefaultValue;
DEPRECATED: Use the modern options API with XML_PARSE_DTDVALID. Global setting, indicate that the parser should work in validating mode. Disabled by default.
xmlFreeFunc xmlFree;
@mem: an already allocated block of memory The variable holding the libxml free() implementation
xmlGenericErrorFunc xmlGenericError;
Global setting: function used for generic error callbacks
void * xmlGenericErrorContext;
Global setting passed to generic error callbacks
int xmlGetWarningsDefaultValue;
DEPRECATED: Don't use Global setting, indicate that the DTD validation should provide warnings. Activated by default.
int xmlIndentTreeOutput;
Global setting, asking the serializer to indent the output tree by default Enabled by default
int xmlKeepBlanksDefaultValue;
DEPRECATED: Use the modern options API with XML_PARSE_NOBLANKS. Global setting, indicate that the parser should keep all blanks nodes found in the content Activated by default, this is actually needed to have the parser conformant to the XML Recommendation, however the option is kept for some applications since this was libxml1 default behaviour.
int xmlLineNumbersDefaultValue;
DEPRECATED: The modern options API always enables line numbers. Global setting, indicate that the parser should store the line number in the content field of elements in the DOM tree. Disabled by default since this may not be safe for old classes of application.
int xmlLoadExtDtdDefaultValue;
DEPRECATED: Use the modern options API with XML_PARSE_DTDLOAD. Global setting, indicate that the parser should load DTD while not validating. Disabled by default.
xmlMallocFunc xmlMalloc;
@size: the size requested in bytes The variable holding the libxml malloc() implementation Returns a pointer to the newly allocated block or NULL in case of error
xmlMallocFunc xmlMallocAtomic;
@size: the size requested in bytes The variable holding the libxml malloc() implementation for atomic data (i.e. blocks not containing pointers), useful when using a garbage collecting allocator. Returns a pointer to the newly allocated block or NULL in case of error
xmlStrdupFunc xmlMemStrdup;
@str: a zero terminated string The variable holding the libxml strdup() implementation Returns the copy of the string or NULL in case of error
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
DEPRECATED: Don't use
int xmlParserDebugEntities;
DEPRECATED: Don't use Global setting, asking the parser to print out debugging information. while handling entities. Disabled by default
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
DEPRECATED: Don't use
const char * xmlParserVersion;
Constant string describing the internal version of the library
int xmlPedanticParserDefaultValue;
DEPRECATED: Use the modern options API with XML_PARSE_PEDANTIC. Global setting, indicate that the parser be pedantic Disabled by default.
xmlReallocFunc xmlRealloc;
@mem: an already allocated block of memory @size: the new size requested in bytes The variable holding the libxml realloc() implementation Returns a pointer to the newly reallocated block or NULL in case of error
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
DEPRECATED: Don't use
int xmlSaveNoEmptyTags;
Global setting, asking the serializer to not output empty tags as <empty/> but <empty></empty>. those two forms are indistinguishable once parsed. Disabled by default
xmlStructuredErrorFunc xmlStructuredError;
Global setting: function used for structured error callbacks
void * xmlStructuredErrorContext;
Global setting passed to structured error callbacks
int xmlSubstituteEntitiesDefaultValue;
DEPRECATED: Use the modern options API with XML_PARSE_NOENT. Global setting, indicate that the parser should not generate entity references but replace them with the actual content of the entity Disabled by default, this should be activated when using XPath since the XPath data model requires entities replacement and the XPath engine does not handle entities references transparently.
const char * xmlTreeIndentString;
The string used to do one-level indent. By default is equal to " " (two spaces)
void xmlCleanupGlobals (void)
DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Additional cleanup for multi-threading
xmlDeregisterNodeFunc xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func)
Registers a callback for node destruction
func: | function pointer to the new DeregisterNodeFunc |
Returns: | the previous value of the deregistration function |
void xmlInitGlobals (void)
DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library. Additional initialisation for multi-threading
void xmlInitializeGlobalState (xmlGlobalStatePtr gs)
xmlInitializeGlobalState() initialize a global state with all the default values of the library.
gs: | a pointer to a newly allocated global state |
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func)
Registers a callback for URI output file handling
func: | function pointer to the new OutputBufferCreateFilenameFunc |
Returns: | the old value of the registration function |
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func)
Registers a callback for URI input file handling
func: | function pointer to the new ParserInputBufferCreateFilenameFunc |
Returns: | the old value of the registration function |
xmlRegisterNodeFunc xmlRegisterNodeDefault (xmlRegisterNodeFunc func)
Registers a callback for node creation
func: | function pointer to the new RegisterNodeFunc |
Returns: | the old value of the registration function |
xmlBufferAllocationScheme xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v)
v: | |
Returns: |
xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault (xmlDeregisterNodeFunc func)
func: | |
Returns: |
int xmlThrDefDoValidityCheckingDefaultValue (int v)
v: | |
Returns: |
xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func)
func: | |
Returns: |
xmlParserInputBufferCreateFilenameFunc xmlThrDefParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func)
func: | |
Returns: |
xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault (xmlRegisterNodeFunc func)
func: | |
Returns: |
void xmlThrDefSetGenericErrorFunc (void * ctx,
xmlGenericErrorFunc handler)
ctx: | |
handler: |
void xmlThrDefSetStructuredErrorFunc (void * ctx,
xmlStructuredErrorFunc handler)
ctx: | |
handler: |
int xmlThrDefSubstituteEntitiesDefaultValue (int v)
v: | |
Returns: |