Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# globals

## Name

globals --

## Synopsis

    void        (*xmlRegisterNodeFunc)          (xmlNodePtr node);
    void        (*xmlDeregisterNodeFunc)        (xmlNodePtr node);
    struct      xmlGlobalState;
    typedef     xmlGlobalStatePtr;
    void        xmlInitializeGlobalState        (xmlGlobalStatePtr gs);
    xmlRegisterNodeFunc xmlRegisterNodeDefault  (xmlRegisterNodeFunc func);
    xmlDeregisterNodeFunc xmlDeregisterNodeDefault
                                                (xmlDeregisterNodeFunc func);
    #define     xmlMalloc                       (size)
    #define     xmlRealloc                      (ptr, size)
    #define     xmlFree
    #define     xmlMemStrdup                    (str)
    #define     docbDefaultSAXHandler
    #define     htmlDefaultSAXHandler
    #define     oldXMLWDcompatibility
    #define     xmlBufferAllocScheme
    #define     xmlDefaultBufferSize
    #define     xmlDefaultSAXHandler
    #define     xmlDefaultSAXLocator
    #define     xmlDoValidityCheckingDefaultValue
    #define     xmlGenericError
    #define     xmlGenericErrorContext
    #define     xmlGetWarningsDefaultValue
    #define     xmlIndentTreeOutput
    #define     xmlTreeIndentString
    #define     xmlKeepBlanksDefaultValue
    #define     xmlLineNumbersDefaultValue
    #define     xmlLoadExtDtdDefaultValue
    #define     xmlParserDebugEntities
    #define     xmlParserVersion
    #define     xmlPedanticParserDefaultValue
    #define     xmlSaveNoEmptyTags
    #define     xmlSubstituteEntitiesDefaultValue
    #define     xmlRegisterNodeDefaultValue
    #define     xmlDeregisterNodeDefaultValue

## Description

## Details

### xmlRegisterNodeFunc ()

    void        (*xmlRegisterNodeFunc)          (xmlNodePtr node);

`node` : |

### xmlDeregisterNodeFunc ()

    void        (*xmlDeregisterNodeFunc)        (xmlNodePtr node);

`node` : |

### struct xmlGlobalState

    struct xmlGlobalState
    {
    	const char *xmlParserVersion;

    	xmlSAXLocator xmlDefaultSAXLocator;
    	xmlSAXHandler xmlDefaultSAXHandler;
    	xmlSAXHandler docbDefaultSAXHandler;
    	xmlSAXHandler htmlDefaultSAXHandler;

    	xmlFreeFunc xmlFree;
    	xmlMallocFunc xmlMalloc;
    	xmlStrdupFunc xmlMemStrdup;
    	xmlReallocFunc xmlRealloc;

    	xmlGenericErrorFunc xmlGenericError;
    	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;
    };

### xmlGlobalStatePtr

### xmlInitializeGlobalState ()

    void        xmlInitializeGlobalState        (xmlGlobalStatePtr gs);

xmlInitializeGlobalState() initialize a global state with all the default values of the library.

`gs` : |

### xmlRegisterNodeDefault ()

    xmlRegisterNodeFunc xmlRegisterNodeDefault  (xmlRegisterNodeFunc func);

Registers a callback for node creation

`func` : |
Returns : |

### xmlDeregisterNodeDefault ()

    xmlDeregisterNodeFunc xmlDeregisterNodeDefault
                                                (xmlDeregisterNodeFunc func);

Registers a callback for node destruction

`func` : |
Returns : |

### xmlMalloc()

    #define     xmlMalloc(size)

Wrapper for the malloc() function used in the XML library.

`size` : |

### xmlRealloc()

    #define     xmlRealloc(ptr, size)

Wrapper for the realloc() function used in the XML library.

`ptr` : |
`size` : |

### xmlFree

    #define     xmlFree

The variable holding the libxml free() implementation

### xmlMemStrdup()

    #define     xmlMemStrdup(str)

Wrapper for the strdup() function, xmlStrdup() is usually preferred.

`str` : |

### docbDefaultSAXHandler

    #define     docbDefaultSAXHandler

Default handler for SGML DocBook, builds the DOM tree

### htmlDefaultSAXHandler

    #define     htmlDefaultSAXHandler

Default handler for HTML, builds the DOM tree

### oldXMLWDcompatibility

    #define     oldXMLWDcompatibility

Global setting, DEPRECATED.

### xmlBufferAllocScheme

    #define     xmlBufferAllocScheme

Global setting, default allocation policy for buffers, default is XML_BUFFER_ALLOC_EXACT

### xmlDefaultBufferSize

    #define     xmlDefaultBufferSize

Global setting, default buffer size. Default value is BASE_BUFFER_SIZE

### xmlDefaultSAXHandler

    #define     xmlDefaultSAXHandler

Default handler for XML, builds the DOM tree

### xmlDefaultSAXLocator

    #define     xmlDefaultSAXLocator

The default SAX Locator { getPublicId, getSystemId, getLineNumber, getColumnNumber}

### xmlDoValidityCheckingDefaultValue

    #define     xmlDoValidityCheckingDefaultValue

Global setting, indicate that the parser should work in validating mode. Disabled by default.

### xmlGenericError

    #define     xmlGenericError

Global setting: function used for generic error callbacks

### xmlGenericErrorContext

    #define     xmlGenericErrorContext

Global setting passed to generic error callbacks

### xmlGetWarningsDefaultValue

    #define     xmlGetWarningsDefaultValue

Global setting, indicate that the parser should provide warnings. Activated by default.

### xmlIndentTreeOutput

    #define     xmlIndentTreeOutput

Global setting, asking the serializer to indent the output tree by default Enabled by default

### xmlTreeIndentString

    #define     xmlTreeIndentString

The string used to do one-level indent. By default is equal to " " (two spaces)

### xmlKeepBlanksDefaultValue

    #define     xmlKeepBlanksDefaultValue

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.

### xmlLineNumbersDefaultValue

    #define     xmlLineNumbersDefaultValue

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 applicaton.

### xmlLoadExtDtdDefaultValue

    #define     xmlLoadExtDtdDefaultValue

Global setting, indicate that the parser should load DTD while not validating. Disabled by default.

### xmlParserDebugEntities

    #define     xmlParserDebugEntities

Global setting, asking the parser to print out debugging informations. while handling entities. Disabled by default

### xmlParserVersion

    #define     xmlParserVersion

Constant string describing the internal version of the library

### xmlPedanticParserDefaultValue

    #define     xmlPedanticParserDefaultValue

Global setting, indicate that the parser be pedantic Disabled by default.

### xmlSaveNoEmptyTags

    #define     xmlSaveNoEmptyTags

Global setting, asking the serializer to not output empty tags as <empty/> but <empty></empty>. those two forms are undistinguishable once parsed. Disabled by default

### xmlSubstituteEntitiesDefaultValue

    #define     xmlSubstituteEntitiesDefaultValue

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.

### xmlRegisterNodeDefaultValue

    #define     xmlRegisterNodeDefaultValue

### xmlDeregisterNodeDefaultValue

    #define     xmlDeregisterNodeDefaultValue

<<< Previous Page | Home | Up | Next Page >>>
threads | DOCBparser