GdomeDOMImplementation

Name

GdomeDOMImplementation -- Interface DOMImplementation implementation.

Synopsis



struct      GdomeDOMImplementation;
GdomeDOMImplementation* gdome_di_mkref      (void);
void        gdome_di_ref                    (GdomeDOMImplementation *self,
                                             GdomeException *exc);
void        gdome_di_unref                  (GdomeDOMImplementation *self,
                                             GdomeException *exc);
gpointer    gdome_di_query_interface        (GdomeDOMImplementation *self,
                                             const char *interface,
                                             GdomeException *exc);
GdomeBoolean gdome_di_hasFeature            (GdomeDOMImplementation *self,
                                             GdomeDOMString *feature,
                                             GdomeDOMString *version,
                                             GdomeException *exc);
GdomeDocumentType* gdome_di_createDocumentType
                                            (GdomeDOMImplementation *self,
                                             GdomeDOMString *qualifiedName,
                                             GdomeDOMString *publicId,
                                             GdomeDOMString *systemId,
                                             GdomeException *exc);
GdomeDocument* gdome_di_createDocument      (GdomeDOMImplementation *self,
                                             GdomeDOMString *namespaceURI,
                                             GdomeDOMString *qualifiedName,
                                             GdomeDocumentType *doctype,
                                             GdomeException *exc);
void        gdome_di_freeDoc                (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             GdomeException *exc);
GdomeDocument* gdome_di_createDocFromURI    (GdomeDOMImplementation *self,
                                             const char *uri,
                                             unsigned int mode,
                                             GdomeException *exc);
GdomeDocument* gdome_di_createDocFromMemory (GdomeDOMImplementation *self,
                                             char *buffer,
                                             unsigned int mode,
                                             GdomeException *exc);
GdomeDocument* gdome_di_createDocFromURIWithEntitiesTable
                                            (GdomeDOMImplementation *self,
                                             const char *uri,
                                             const GdomeEntitiesTableEntry entityTable[],
                                             unsigned int mode,
                                             GdomeException *exc);
GdomeDocument* gdome_di_createDocFromMemoryWithEntitiesTable
                                            (GdomeDOMImplementation *self,
                                             char *buffer,
                                             const GdomeEntitiesTableEntry entityTable[],
                                             unsigned int mode,
                                             GdomeException *exc);
GdomeBoolean gdome_di_saveDocToFile         (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *filename,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);
GdomeBoolean gdome_di_saveDocToFileEnc      (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *filename,
                                             const char *encoding,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);
GdomeBoolean gdome_di_saveDocToMemory       (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             char **mem,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);
GdomeBoolean gdome_di_saveDocToMemoryEnc    (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             char **mem,
                                             const char *encoding,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);
void        gdome_di_enableEvent            (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *name,
                                             GdomeException *exc);
void        gdome_di_disableEvent           (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *name,
                                             GdomeException *exc);
GdomeBoolean gdome_di_eventIsEnabled        (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *name,
                                             GdomeException *exc);

Description

The GdomeDOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.

Details

struct GdomeDOMImplementation

struct GdomeDOMImplementation {
	gpointer user_data;
};


gdome_di_mkref ()

GdomeDOMImplementation* gdome_di_mkref      (void);

Constructor of the DOMImplementation interface.


gdome_di_ref ()

void        gdome_di_ref                    (GdomeDOMImplementation *self,
                                             GdomeException *exc);

Increase the reference count of the DOMImplementation structure.


gdome_di_unref ()

void        gdome_di_unref                  (GdomeDOMImplementation *self,
                                             GdomeException *exc);

Decrease the reference count of the DOMImplementation. Free the structure if DOMImplementation will have zero reference.


gdome_di_query_interface ()

gpointer    gdome_di_query_interface        (GdomeDOMImplementation *self,
                                             const char *interface,
                                             GdomeException *exc);


gdome_di_hasFeature ()

GdomeBoolean gdome_di_hasFeature            (GdomeDOMImplementation *self,
                                             GdomeDOMString *feature,
                                             GdomeDOMString *version,
                                             GdomeException *exc);

Tests whether the DOM implementation implements a specific feature.


gdome_di_createDocumentType ()

GdomeDocumentType* gdome_di_createDocumentType
                                            (GdomeDOMImplementation *self,
                                             GdomeDOMString *qualifiedName,
                                             GdomeDOMString *publicId,
                                             GdomeDOMString *systemId,
                                             GdomeException *exc);

Creates an empty DocumentType node. Entity declarations and notations are not made available. Entity reference expansions and default attribute additions do not occur. It is expected that a future version of the DOM will provide a way for populating a DocumentType.

GDOME_NAMESPACE_ERR: Raised if the qualifiedName is malformed.


gdome_di_createDocument ()

GdomeDocument* gdome_di_createDocument      (GdomeDOMImplementation *self,
                                             GdomeDOMString *namespaceURI,
                                             GdomeDOMString *qualifiedName,
                                             GdomeDocumentType *doctype,
                                             GdomeException *exc);

Creates an XML Document object of the specified type with its document element.

GDOME_NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is NULL, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from "http://www.w3.org/XML/1998/namespace" GDOME_WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document.


gdome_di_freeDoc ()

void        gdome_di_freeDoc                (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             GdomeException *exc);

DEPRECATED! Free all objects and structures associated to the Document specified.


gdome_di_createDocFromURI ()

GdomeDocument* gdome_di_createDocFromURI    (GdomeDOMImplementation *self,
                                             const char *uri,
                                             unsigned int mode,
                                             GdomeException *exc);

Loads a XML Document from a URI and build a DOM tree. If mode is GDOME_LOAD_PARSING the document must be well formed, if mode is GDOME_LOAD_VALIDATING the document must valid and if mode is GDOME_LOAD_RECOVERING a tree is built anyway. If the GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is performed (es. mode = GDOME_LOAD_PARSING | GDOME_LOAD_SUBSTITUTE_ENTITIES ). If the GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated with default attributes from the DTD.


gdome_di_createDocFromMemory ()

GdomeDocument* gdome_di_createDocFromMemory (GdomeDOMImplementation *self,
                                             char *buffer,
                                             unsigned int mode,
                                             GdomeException *exc);

Loads a XML Document from a memory buffer and build a DOM tree. If mode is GDOME_LOAD_PARSING the document must be well formed, if mode is GDOME_LOAD_VALIDATING the document must valid and if mode is GDOME_LOAD_RECOVERING a tree is built anyway. If the GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is performed (es. mode = GDOME_LOAD_PARSING | GDOME_LOAD_SUBSTITUTE_ENTITIES ). If the GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated with default attributes from the DTD.


gdome_di_createDocFromURIWithEntitiesTable ()

GdomeDocument* gdome_di_createDocFromURIWithEntitiesTable
                                            (GdomeDOMImplementation *self,
                                             const char *uri,
                                             const GdomeEntitiesTableEntry entityTable[],
                                             unsigned int mode,
                                             GdomeException *exc);

Loads a XML Document using also entity declaration specified in entityTable from a URI and build a DOM tree. If mode is GDOME_LOAD_PARSING the document must be well formed, if mode is GDOME_LOAD_VALIDATING the document must valid and if mode is GDOME_LOAD_RECOVERING a tree is built anyway. If the GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is performed (es. mode = GDOME_LOAD_PARSING | GDOME_LOAD_SUBSTITUTE_ENTITIES ). If the GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated with default attributes from the DTD.


gdome_di_createDocFromMemoryWithEntitiesTable ()

GdomeDocument* gdome_di_createDocFromMemoryWithEntitiesTable
                                            (GdomeDOMImplementation *self,
                                             char *buffer,
                                             const GdomeEntitiesTableEntry entityTable[],
                                             unsigned int mode,
                                             GdomeException *exc);

Loads a XML Document using also entity declaration specified in entityTable from a memory buffer and build a DOM tree. If mode is GDOME_LOAD_PARSING the document must be well formed, if mode is GDOME_LOAD_VALIDATING the document must valid and if mode is GDOME_LOAD_RECOVERING a tree is built anyway. If the GDOME_LOAD_SUBSTITUTE_ENTITIES flag is added, entity substitution is performed (es. mode = GDOME_LOAD_PARSING | GDOME_LOAD_SUBSTITUTE_ENTITIES ). If the GDOME_LOAD_COMPLETE_ATTR flag is set, the tree is populated with default attributes from the DTD.


gdome_di_saveDocToFile ()

GdomeBoolean gdome_di_saveDocToFile         (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *filename,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);

Save the DOM tree of the Document specified to file.


gdome_di_saveDocToFileEnc ()

GdomeBoolean gdome_di_saveDocToFileEnc      (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *filename,
                                             const char *encoding,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);

Save the DOM tree of the Document specified to file with the specified Character encoding.


gdome_di_saveDocToMemory ()

GdomeBoolean gdome_di_saveDocToMemory       (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             char **mem,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);

Save the DOM tree of the Document specified to a new allocated memory and return it in the mem pointer.


gdome_di_saveDocToMemoryEnc ()

GdomeBoolean gdome_di_saveDocToMemoryEnc    (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             char **mem,
                                             const char *encoding,
                                             GdomeSavingCode mode,
                                             GdomeException *exc);

Save the DOM tree of the Document specified using the specified character encoding standard to a new allocated memory and return it in the mem pointer.


gdome_di_enableEvent ()

void        gdome_di_enableEvent            (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *name,
                                             GdomeException *exc);

Enables the propagation of the event type specified.


gdome_di_disableEvent ()

void        gdome_di_disableEvent           (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *name,
                                             GdomeException *exc);

Disables the propagation of the event type specified.


gdome_di_eventIsEnabled ()

GdomeBoolean gdome_di_eventIsEnabled        (GdomeDOMImplementation *self,
                                             GdomeDocument *doc,
                                             const char *name,
                                             GdomeException *exc);

Checks if the specified event type is enabled.