Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.xml
Class QDomImplementation

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.xml.QDomImplementation

All Implemented Interfaces:
  QtJambiInterface

    public class QDomImplementation

extends QtJambiObject

The `QDomImplementation` class provides information about the features of the DOM implementation.

This class describes the features that are supported by the DOM implementation. Currently the XML subset of DOM Level 1 and DOM Level 2 Core are supported.

Normally you will use the function QDomDocument::implementation() to get the implementation object.

You can create a new document type with `createDocumentType` and a new document with `createDocument`.

For further information about the Document Object Model see Level 1 and Level 2 Core. For a more general introduction of the DOM implementation see the `QDomDocument` documentation.

See Also:
  `hasFeature`

Nested Class Summary
`static class` | `QDomImplementation.InvalidDataPolicy` This enum specifies what should be done when a factory function in `QDomDocument` is called with invalid data.

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>`

Constructor Summary
`QDomImplementation()` Constructs a `QDomImplementation` object.
`QDomImplementation(QDomImplementation arg__1)` Constructs a copy of `arg__1`.

Method Summary
`QDomDocument` | `createDocument(java.lang.String nsURI, java.lang.String qName, QDomDocumentType doctype)` Creates a DOM document with the document type `doctype`.
`QDomDocumentType` | `createDocumentType(java.lang.String qName, java.lang.String publicId, java.lang.String systemId)` Creates a document type node for the name `qName`.
`boolean` | `equals(java.lang.Object other)`
`static QDomImplementation` | `fromNativePointer(QNativePointer nativePointer)` This function returns the QDomImplementation instance pointed to by nativePointer
`boolean` | `hasFeature(java.lang.String feature, java.lang.String version)` The function returns true if QDom implements the requested `version` of a `feature`; otherwise returns false.
`static QDomImplementation.InvalidDataPolicy` | `invalidDataPolicy()` Returns the invalid data policy, which specifies what should be done when a factory function in `QDomDocument` is passed invalid data.
`boolean` | `isNull()` Returns false if the object was created by QDomDocument::implementation(); otherwise returns true.
`static QNativePointer` | `nativePointerArray(QDomImplementation[] array)` This function returns a QNativePointer that is pointing to the specified QDomImplementation array.
`static void` | `setInvalidDataPolicy(QDomImplementation.InvalidDataPolicy policy)` Sets the invalid data policy, which specifies what should be done when a factory function in `QDomDocument` is passed invalid data.

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class java.lang.Object
`clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QDomImplementation

    public QDomImplementation()

  Constructs a `QDomImplementation` object.

### QDomImplementation

    public QDomImplementation(QDomImplementation arg__1)

  Constructs a copy of `arg__1`.

Method Detail

### createDocument

    public final QDomDocument createDocument(java.lang.String nsURI,
                                             java.lang.String qName,
                                             QDomDocumentType doctype)

  Creates a DOM document with the document type `doctype`. This function also adds a root element node with the qualified name `qName` and the namespace URI `nsURI`.

### createDocumentType

    public final QDomDocumentType createDocumentType(java.lang.String qName,
                                                     java.lang.String publicId,
                                                     java.lang.String systemId)

  Creates a document type node for the name `qName`.

  `publicId` specifies the public identifier of the external subset. If you specify an empty string (`QString`) as the `publicId`, this means that the document type has no public identifier.

  `systemId` specifies the system identifier of the external subset. If you specify an empty string as the `systemId`, this means that the document type has no system identifier.

  Since you cannot have a public identifier without a system identifier, the public identifier is set to an empty string if there is no system identifier.

  DOM level 2 does not support any other document type declaration features.

  The only way you can use a document type that was created this way, is in combination with the `createDocument` function to create a `QDomDocument` with this document type.

  In the DOM specification, this is the only way to create a non-null document. For historical reasons, Qt also allows to create the document using the default empty constructor. The resulting document is null, but becomes non-null when a factory function, for example QDomDocument::createElement(), is called. The document also becomes non-null when setContent() is called.

  See Also:
    `createDocument`

### hasFeature

    public final boolean hasFeature(java.lang.String feature,
                                    java.lang.String version)

  The function returns true if QDom implements the requested `version` of a `feature`; otherwise returns false.

  The currently supported features and their versions:

  Feature | Version
  --- | ---
  XML | 1.0

### isNull

    public final boolean isNull()

  Returns false if the object was created by QDomDocument::implementation(); otherwise returns true.

### invalidDataPolicy

    public static QDomImplementation.InvalidDataPolicy invalidDataPolicy()

  Returns the invalid data policy, which specifies what should be done when a factory function in `QDomDocument` is passed invalid data.

  See Also:
    `setInvalidDataPolicy`, `InvalidDataPolicy`

### setInvalidDataPolicy

    public static void setInvalidDataPolicy(QDomImplementation.InvalidDataPolicy policy)

  Sets the invalid data policy, which specifies what should be done when a factory function in `QDomDocument` is passed invalid data.

  The `policy` is set for all instances of `QDomDocument` which already exist and which will be created in the future.

          QDomDocument doc;
          QDomImplementation impl;

          // This will create the element, but the resulting XML document will
          // be invalid, because '~' is not a valid character in a tag name.
          impl.setInvalidDataPolicy(QDomImplementation::AcceptInvalidData);
          QDomElement elt1 = doc.createElement("foo~bar");

          // This will create an element with the tag name "foobar".
          impl.setInvalidDataPolicy(QDomImplementation::DropInvalidData);
          QDomElement elt2 = doc.createElement("foo~bar");

          // This will create a null element.
          impl.setInvalidDataPolicy(QDomImplementation::ReturnNullNode);
          QDomElement elt3 = doc.createElement("foo~bar");

  See Also:
    `invalidDataPolicy`, `InvalidDataPolicy`

### fromNativePointer

    public static QDomImplementation fromNativePointer(QNativePointer nativePointer)

  This function returns the QDomImplementation instance pointed to by nativePointer

  Parameters:
    `nativePointer` - the QNativePointer of which object should be returned.

### nativePointerArray

    public static QNativePointer nativePointerArray(QDomImplementation[] array)

  This function returns a QNativePointer that is pointing to the specified QDomImplementation array.

  Parameters:
    `array` - the array that the returned pointer will point to.
  Returns:
    a QNativePointer that is pointing to the specified array.

### equals

    public boolean equals(java.lang.Object other)

  Overrides:
    `equals` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD