globals

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

# globals

## Name

globals --

## Synopsis

    struct      xmlGlobalState;
    typedef     xmlGlobalStatePtr;
    void        xmlInitializeGlobalState        (xmlGlobalStatePtr gs);
    #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     xmlKeepBlanksDefaultValue
    #define     xmlLineNumbersDefaultValue
    #define     xmlLoadExtDtdDefaultValue
    #define     xmlParserDebugEntities
    #define     xmlParserVersion
    #define     xmlPedanticParserDefaultValue
    #define     xmlSaveNoEmptyTags
    #define     xmlSubstituteEntitiesDefaultValue

## Description

## Details

### 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;
    };

### xmlGlobalStatePtr

    typedef xmlGlobalState *xmlGlobalStatePtr;

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

### 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 Disabled by default

### 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 variable controlling the entity substitution default behavior.

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