#

## Module globals from libxml2

API Menu

- Main Menu
- Developer Menu
- Code Examples
- API Menu
- Parser API
- Tree API
- Reader API
- XML Guidelines
- ChangeLog

API Indexes

- Alphabetic
- Constructors
- Functions/Types
- Modules
- Symbols

Related links

- Mail archive
- XSLT libxslt
- DOM gdome2
- XML-DSig xmlsec
- FTP
- Windows binaries
- Solaris binaries
- MacOsX binaries
- lxml Python bindings
- Perl bindings
- C++ bindings
- PHP bindings
- Pascal bindings
- Ruby bindings
- Tcl bindings
- Bug Tracker

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

## Table of Contents

    Structure xmlGlobalState
    struct _xmlGlobalState

    Typedef xmlGlobalState * xmlGlobalStatePtr

    void	xmlCleanupGlobals		(void)

    xmlDeregisterNodeFunc	xmlDeregisterNodeDefault	(xmlDeregisterNodeFunc func)

    Function type: xmlDeregisterNodeFunc
    void	xmlDeregisterNodeFunc		(xmlNodePtr node)

    void	xmlInitGlobals			(void)

    void	xmlInitializeGlobalState	(xmlGlobalStatePtr gs)

    xmlOutputBufferCreateFilenameFunc	xmlOutputBufferCreateFilenameDefault	(xmlOutputBufferCreateFilenameFunc func)

    Function type: xmlOutputBufferCreateFilenameFunc
    xmlOutputBufferPtr	xmlOutputBufferCreateFilenameFunc	(const char * URI,
    							 xmlCharEncodingHandlerPtr encoder,
    							 int compression)

    xmlParserInputBufferCreateFilenameFunc	xmlParserInputBufferCreateFilenameDefault	(xmlParserInputBufferCreateFilenameFunc func)

    Function type: xmlParserInputBufferCreateFilenameFunc
    xmlParserInputBufferPtr	xmlParserInputBufferCreateFilenameFunc	(const char * URI,
    							 xmlCharEncoding enc)

    xmlRegisterNodeFunc	xmlRegisterNodeDefault	(xmlRegisterNodeFunc func)

    Function type: xmlRegisterNodeFunc
    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)

## Description

### Structure xmlGlobalState

    Structure xmlGlobalState
    struct _xmlGlobalState {
        const char *	xmlParserVersion
        xmlSAXLocator	xmlDefaultSAXLocator
        xmlSAXHandlerV1	xmlDefaultSAXHandler
        xmlSAXHandlerV1	docbDefaultSAXHandler
        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
    }

### Function: xmlCleanupGlobals

    void	xmlCleanupGlobals		(void)

Additional cleanup for multi-threading

### Function: xmlDeregisterNodeDefault

    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

### Function type: xmlDeregisterNodeFunc

    Function type: xmlDeregisterNodeFunc
    void	xmlDeregisterNodeFunc		(xmlNodePtr node)

Signature for the deregistration callback of a discarded node

`node`: | the current node

### Function: xmlInitGlobals

    void	xmlInitGlobals			(void)

Additional initialisation for multi-threading

### Function: xmlInitializeGlobalState

    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

### Function: xmlOutputBufferCreateFilenameDefault

    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

### Function type: xmlOutputBufferCreateFilenameFunc

    Function type: xmlOutputBufferCreateFilenameFunc
    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.

### Function: xmlParserInputBufferCreateFilenameDefault

    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

### Function type: xmlParserInputBufferCreateFilenameFunc

    Function type: xmlParserInputBufferCreateFilenameFunc
    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.

### Function: xmlRegisterNodeDefault

    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

### Function type: xmlRegisterNodeFunc

    Function type: xmlRegisterNodeFunc
    void	xmlRegisterNodeFunc		(xmlNodePtr node)

Signature for the registration callback of a created node

`node`: | the current node

### Function: xmlThrDefBufferAllocScheme

    xmlBufferAllocationScheme	xmlThrDefBufferAllocScheme	(xmlBufferAllocationScheme v)

`v`: |
`Returns`: |

### Function: xmlThrDefDefaultBufferSize

    int	xmlThrDefDefaultBufferSize	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefDeregisterNodeDefault

    xmlDeregisterNodeFunc	xmlThrDefDeregisterNodeDefault	(xmlDeregisterNodeFunc func)

`func`: |
`Returns`: |

### Function: xmlThrDefDoValidityCheckingDefaultValue

    int	xmlThrDefDoValidityCheckingDefaultValue	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefGetWarningsDefaultValue

    int	xmlThrDefGetWarningsDefaultValue	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefIndentTreeOutput

    int	xmlThrDefIndentTreeOutput	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefKeepBlanksDefaultValue

    int	xmlThrDefKeepBlanksDefaultValue	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefLineNumbersDefaultValue

    int	xmlThrDefLineNumbersDefaultValue	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefLoadExtDtdDefaultValue

    int	xmlThrDefLoadExtDtdDefaultValue	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefOutputBufferCreateFilenameDefault

    xmlOutputBufferCreateFilenameFunc	xmlThrDefOutputBufferCreateFilenameDefault	(xmlOutputBufferCreateFilenameFunc func)

`func`: |
`Returns`: |

### Function: xmlThrDefParserDebugEntities

    int	xmlThrDefParserDebugEntities	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefParserInputBufferCreateFilenameDefault

    xmlParserInputBufferCreateFilenameFunc	xmlThrDefParserInputBufferCreateFilenameDefault	(xmlParserInputBufferCreateFilenameFunc func)

`func`: |
`Returns`: |

### Function: xmlThrDefPedanticParserDefaultValue

    int	xmlThrDefPedanticParserDefaultValue	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefRegisterNodeDefault

    xmlRegisterNodeFunc	xmlThrDefRegisterNodeDefault	(xmlRegisterNodeFunc func)

`func`: |
`Returns`: |

### Function: xmlThrDefSaveNoEmptyTags

    int	xmlThrDefSaveNoEmptyTags	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefSetGenericErrorFunc

    void	xmlThrDefSetGenericErrorFunc	(void * ctx,
    					 xmlGenericErrorFunc handler)

`ctx`: |
`handler`: |

### Function: xmlThrDefSetStructuredErrorFunc

    void	xmlThrDefSetStructuredErrorFunc	(void * ctx,
    					 xmlStructuredErrorFunc handler)

`ctx`: |
`handler`: |

### Function: xmlThrDefSubstituteEntitiesDefaultValue

    int	xmlThrDefSubstituteEntitiesDefaultValue	(int v)

`v`: |
`Returns`: |

### Function: xmlThrDefTreeIndentString

    const char *	xmlThrDefTreeIndentString	(const char * v)

`v`: |
`Returns`: |

Daniel Veillard