<class name="QDomImplementation" doc="/** <p>The <a href="QDomImplementation.html#QDomImplementation(com.trolltech.qt.xml.QDomImplementation)"><tt>QDomImplementation</tt></a> class provides information about the features of the DOM implementation.</p> <p>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.</p> <p>Normally you will use the function QDomDocument::implementation() to get the implementation object.</p> <p>You can create a new document type with <a href="QDomImplementation.html#createDocumentType(java.lang.String, java.lang.String, java.lang.String)"><tt>createDocumentType</tt></a> and a new document with <a href="QDomImplementation.html#createDocument(java.lang.String, java.lang.String, com.trolltech.qt.xml.QDomDocumentType)"><tt>createDocument</tt></a>.</p> <p>For further information about the Document Object Model see <a href="http://www.w3.org/TR/REC-DOM-Level-1/">Level 1</tt></a> and <a href="http://www.w3.org/TR/DOM-Level-2-Core/">Level 2 Core</tt></a>. For a more general introduction of the DOM implementation see the <a href="QDomDocument.html"><tt>QDomDocument</tt></a> documentation.</p> @see <a href="QDomImplementation.html#hasFeature(java.lang.String, java.lang.String)"><tt>hasFeature</tt></a> */"> <method name="public QDomImplementation()" doc="/** <p>Constructs a <a href="QDomImplementation.html#QDomImplementation(com.trolltech.qt.xml.QDomImplementation)"><tt>QDomImplementation</tt></a> object.</p> */"/> <method name="public QDomImplementation(com.trolltech.qt.xml.QDomImplementation arg__1)" doc="/** <p>Constructs a copy of <tt>arg__1</tt>.</p> */"/> <method name="public final com.trolltech.qt.xml.QDomDocument createDocument(java.lang.String nsURI, java.lang.String qName, com.trolltech.qt.xml.QDomDocumentType doctype)" doc="/** <p>Creates a DOM document with the document type <tt>doctype</tt>. This function also adds a root element node with the qualified name <tt>qName</tt> and the namespace URI <tt>nsURI</tt>.</p> */"/> <method name="public final com.trolltech.qt.xml.QDomDocumentType createDocumentType(java.lang.String qName, java.lang.String publicId, java.lang.String systemId)" doc="/** <p>Creates a document type node for the name <tt>qName</tt>.</p> <p><tt>publicId</tt> specifies the public identifier of the external subset. If you specify an empty string (<a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a>) as the <tt>publicId</tt>, this means that the document type has no public identifier.</p> <p><tt>systemId</tt> specifies the system identifier of the external subset. If you specify an empty string as the <tt>systemId</tt>, this means that the document type has no system identifier.</p> <p>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.</p> <p>DOM level 2 does not support any other document type declaration features.</p> <p>The only way you can use a document type that was created this way, is in combination with the <a href="QDomImplementation.html#createDocument(java.lang.String, java.lang.String, com.trolltech.qt.xml.QDomDocumentType)"><tt>createDocument</tt></a> function to create a <a href="QDomDocument.html"><tt>QDomDocument</tt></a> with this document type.</p> <p>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.</p> @see <a href="QDomImplementation.html#createDocument(java.lang.String, java.lang.String, com.trolltech.qt.xml.QDomDocumentType)"><tt>createDocument</tt></a> */"/> <method name="public final boolean hasFeature(java.lang.String feature, java.lang.String version)" doc="/** <p>The function returns true if QDom implements the requested <tt>version</tt> of a <tt>feature</tt>; otherwise returns false.</p> <p>The currently supported features and their versions:</p> <p><table align="center" cellpadding="2" cellspacing="1" border="0"> <thead><tr valign="top" class="qt-style"><th>Feature</th><th>Version</th></tr></thead> <tr valign="top" class="odd"><td>XML</td><td>1.0</td></tr> </table></p> */"/> <method name="public final boolean isNull()" doc="/** <p>Returns false if the object was created by QDomDocument::implementation(); otherwise returns true.</p> */"/> <method name="public static com.trolltech.qt.xml.QDomImplementation.InvalidDataPolicy invalidDataPolicy()" doc="/** <p>Returns the invalid data policy, which specifies what should be done when a factory function in <a href="QDomDocument.html"><tt>QDomDocument</tt></a> is passed invalid data.</p> @see <a href="QDomImplementation.html#setInvalidDataPolicy(com.trolltech.qt.xml.QDomImplementation.InvalidDataPolicy)"><tt>setInvalidDataPolicy</tt></a> @see <a href="QDomImplementation.html#InvalidDataPolicy-enum"><tt>InvalidDataPolicy</tt></a> */"/> <method name="public static void setInvalidDataPolicy(com.trolltech.qt.xml.QDomImplementation.InvalidDataPolicy policy)" doc="/** <p>Sets the invalid data policy, which specifies what should be done when a factory function in <a href="QDomDocument.html"><tt>QDomDocument</tt></a> is passed invalid data.</p> <p>The <tt>policy</tt> is set for all instances of <a href="QDomDocument.html"><tt>QDomDocument</tt></a> which already exist and which will be created in the future.</p> <pre> QDomDocument doc; QDomImplementation impl; <span class="comment"> // This will create the element, but the resulting XML document will</span> <span class="comment"> // be invalid, because '~' is not a valid character in a tag name.</span> impl.setInvalidDataPolicy(QDomImplementation::AcceptInvalidData); QDomElement elt1 = doc.createElement(&quot;foo~bar&quot;); <span class="comment"> // This will create an element with the tag name &quot;foobar&quot;.</span> impl.setInvalidDataPolicy(QDomImplementation::DropInvalidData); QDomElement elt2 = doc.createElement(&quot;foo~bar&quot;); <span class="comment"> // This will create a null element.</span> impl.setInvalidDataPolicy(QDomImplementation::ReturnNullNode); QDomElement elt3 = doc.createElement(&quot;foo~bar&quot;);</pre> @see <a href="QDomImplementation.html#invalidDataPolicy()"><tt>invalidDataPolicy</tt></a> @see <a href="QDomImplementation.html#InvalidDataPolicy-enum"><tt>InvalidDataPolicy</tt></a> */"/> <enum name="InvalidDataPolicy" doc="/** <p>This enum specifies what should be done when a factory function in <a href="QDomDocument.html"><tt>QDomDocument</tt></a> is called with invalid data.</p> @see <a href="QDomImplementation.html#setInvalidDataPolicy(com.trolltech.qt.xml.QDomImplementation.InvalidDataPolicy)"><tt>setInvalidDataPolicy</tt></a> @see <a href="QDomImplementation.html#invalidDataPolicy()"><tt>invalidDataPolicy</tt></a> */"> <enum-value name="AcceptInvalidChars" doc="/** <p>The data should be stored in the DOM object anyway. In this case the resulting XML document might not be well-formed. This is the default value and QDom's behavior in Qt &lt; 4.1&#x2e;</p> */"/> <enum-value name="DropInvalidChars" doc="/** <p>The invalid characters should be removed from the data.</p> */"/> <enum-value name="ReturnNullNode" doc="/** <p>The factory function should return a null node.</p> */"/> </enum> </class>