next up previous
Next: A Simple Example Up: Gdome2 Bootstrap Previous: Gdome2 Bootstrap

Standard way to Create a GdomeDocument

Within the DOM specification, the only way to create a Document object is by means of the createDocument method in the DOMImplementation interface. In Gdome2 this feature is implemented by
gdome_DOMImplementation_createDocument (GdomeDOMImplementation *self,
                                        GdomeDOMString *namespaceURI,
                                        GdomeDOMString *qualifiedName,
                                        GdomeDocumentType *doctype,
                                        GdomeException *exc)
which creates a Document object of the specified type with a root element specified by namespaceURI and qualifiedName. Gdome2 also implements a non standard way to create a new Document object parsing a XML document identified by a URI:
gdome_DOMImplementation_parseFile (GdomeDOMImplementation *self,
                                   const gchar* uri,
                                   GdomeException* exc)
The document can also be validated using gdome_DOMimplentation_validateFile which has the same prototype as the method above.

Paolo Casarini 2001-04-01