>
GdomeDOMImplementationGdome2 Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
The GdomeDOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.
GdomeDOMImplementation* gdome_di_mkref (void); |
Constructor of the DOMImplementation interface.
void gdome_di_ref (GdomeDOMImplementation *self, GdomeException *exc); |
Increase the reference count of the DOMImplementation structure.
void gdome_di_unref (GdomeDOMImplementation *self, GdomeException *exc); |
Decrease the reference count of the DOMImplementation. Free the structure if DOMImplementation will have zero reference.
gpointer gdome_di_query_interface (GdomeDOMImplementation *self, const char *interface, GdomeException *exc); |
GdomeBoolean gdome_di_hasFeature (GdomeDOMImplementation *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc); |
Tests whether the DOM implementation implements a specific feature.
self : | The DOMImplementation Object ref |
feature : | The name of the feature to test (case-insensitive). |
version : | This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return TRUE. |
exc : | Exception Object ref |
Returns : | TRUE if the feature is supported, FALSE otherwise. |
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.
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.
void gdome_di_freeDoc (GdomeDOMImplementation *self, GdomeDocument *doc, GdomeException *exc); |
DEPRECATED! Free all objects and structures associated to the Document specified.
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.
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.
self : | DOMImplementation Object ref |
buffer : | a pointer to char array that holds the XML document |
mode : | specifies if the document is to be parsed, validated or recovered and if the entity substitution has to be done. |
exc : | Exception Object ref |
Returns : | The Document Object of the created tree or NULL if an error occur. |
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.
self : | DOMImplementation Object ref |
uri : | the uri of XML file to load |
entityTable : | array of GdomeEntitiesTableEntry that define name, value, publicID ans systemID of entities used but not declared in DTD. The array must be NULL terminated. |
mode : | specifies if the document is to be parsed, validated or recovered and if the entity substitution has to be done. |
exc : | Exception Object ref |
Returns : | The Document Object of the created tree or NULL if an error occur. |
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.
self : | DOMImplementation Object ref |
buffer : | a pointer to char array that holds the XML document |
entityTable : | array of GdomeEntitiesTableEntry that define name, value, publicID ans systemID of entities used but not declared in DTD. The array must be NULL terminated. |
mode : | specifies if the document is to be parsed, validated or recovered and if the entity substitution has to be done. |
exc : | Exception Object ref |
Returns : | The Document Object of the created tree or NULL if an error occur. |
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.
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.
self : | DOMImplementation Object ref |
doc : | the Document of which the tree is wanted to be saved |
filename : | the XML filename to save |
encoding : | character encoding to use when generating XML text |
mode : | the indentation mode wanted |
exc : | Exception Object ref |
Returns : | FALSE in case of failure, TRUE otherwise. |
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.
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.
self : | DOMImplementation Object ref |
doc : | the Document of which the tree is wanted to be saved |
mem : | the memory pointer where the saved document is returned |
encoding : | character encoding to use when generating XML text |
mode : | the indentation mode wanted |
exc : | Exception Object ref |
Returns : | FALSE in case of failure, TRUE otherwise. |