#

## 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
- Pascal 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)

    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)

    int	xmlThrDefParserDebugEntities	(int v)

    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
    }

### 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)

`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: 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)

`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: xmlThrDefParserDebugEntities

    int	xmlThrDefParserDebugEntities	(int v)

`v`: |
`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