Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 644

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDomImplementation Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDomImplementation Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QDomImplementation class provides information about the
features of the DOM implementation. <a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qdomimplementation.html#InvalidDataPolicy-enum">InvalidDataPolicy</a></b> { AcceptInvalidChars, DropInvalidChars, ReturnNullNode }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdomimplementation.html#QDomImplementation">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomimplementation.html#QDomImplementation-2">__init__</a></b> (<i>self</i>, QDomImplementation)</li><li><div class="fn" />QDomDocument <b><a href="qdomimplementation.html#createDocument">createDocument</a></b> (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>qName</i>, QDomDocumentType&#160;<i>doctype</i>)</li><li><div class="fn" />QDomDocumentType <b><a href="qdomimplementation.html#createDocumentType">createDocumentType</a></b> (<i>self</i>, QString&#160;<i>qName</i>, QString&#160;<i>publicId</i>, QString&#160;<i>systemId</i>)</li><li><div class="fn" />bool <b><a href="qdomimplementation.html#hasFeature">hasFeature</a></b> (<i>self</i>, QString&#160;<i>feature</i>, QString&#160;<i>version</i>)</li><li><div class="fn" />bool <b><a href="qdomimplementation.html#isNull">isNull</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />InvalidDataPolicy <b><a href="qdomimplementation.html#invalidDataPolicy">invalidDataPolicy</a></b> ()</li><li><div class="fn" /><b><a href="qdomimplementation.html#setInvalidDataPolicy">setInvalidDataPolicy</a></b> (InvalidDataPolicy&#160;<i>policy</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qdomimplementation.html#__eq__">__eq__</a></b> (<i>self</i>, QDomImplementation)</li><li><div class="fn" />bool <b><a href="qdomimplementation.html#__ne__">__ne__</a></b> (<i>self</i>, QDomImplementation)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDomImplementation 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 <a href="qdomdocument.html#implementation">QDomDocument.implementation</a>()
to get the implementation object.</p>
<p>You can create a new document type with <a href="qdomimplementation.html#createDocumentType">createDocumentType</a>()
and a new document with <a href="qdomimplementation.html#createDocument">createDocument</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</a> and
<a href="http://www.w3.org/TR/DOM-Level-2-Core/">Level 2 Core</a>.
For a more general introduction of the DOM implementation see the
<a href="qdomdocument.html">QDomDocument</a> documentation.</p>
<p>The QDom classes have a few issues of nonconformance with the
XML specifications that cannot be fixed in Qt 4 without breaking
backward compatibility. The <a href="qtxmlpatterns.html">QtXmlPatterns</a> module and the <a href="qxmlstreamreader.html">QXmlStreamReader</a> and <a href="qxmlstreamwriter.html">QXmlStreamWriter</a> classes have a higher
degree of a conformance.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="InvalidDataPolicy-enum" />QDomImplementation.InvalidDataPolicy</h3><p>This enum specifies what should be done when a factory function
in <a href="qdomdocument.html">QDomDocument</a> is called with
invalid data.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QDomImplementation.AcceptInvalidChars</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">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.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QDomImplementation.DropInvalidChars</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The invalid characters should be removed from
the data.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QDomImplementation.ReturnNullNode</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The factory function should return a null
node.</td>
</tr>
</table>
<p><b>See also</b> <a href="qdomimplementation.html#setInvalidDataPolicy">setInvalidDataPolicy</a>()
and <a href="qdomimplementation.html#invalidDataPolicy">invalidDataPolicy</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDomImplementation" />QDomImplementation.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qdomimplementation.html">QDomImplementation</a> object.</p>


<h3 class="fn"><a name="QDomImplementation-2" />QDomImplementation.__init__ (<i>self</i>, <a href="qdomimplementation.html">QDomImplementation</a>)</h3><p>Constructs a copy of <i>x</i>.</p>


<h3 class="fn"><a name="createDocument" /><a href="qdomdocument.html">QDomDocument</a> QDomImplementation.createDocument (<i>self</i>, QString&#160;<i>nsURI</i>, QString&#160;<i>qName</i>, <a href="qdomdocumenttype.html">QDomDocumentType</a>&#160;<i>doctype</i>)</h3><p>Creates a DOM document with the document type <i>doctype</i>.
This function also adds a root element node with the qualified name
<i>qName</i> and the namespace URI <i>nsURI</i>.</p>


<h3 class="fn"><a name="createDocumentType" /><a href="qdomdocumenttype.html">QDomDocumentType</a> QDomImplementation.createDocumentType (<i>self</i>, QString&#160;<i>qName</i>, QString&#160;<i>publicId</i>, QString&#160;<i>systemId</i>)</h3><p>Creates a document type node for the name <i>qName</i>.</p>
<p><i>publicId</i> specifies the public identifier of the external
subset. If you specify an empty string (QString()) as the
<i>publicId</i>, this means that the document type has no public
identifier.</p>
<p><i>systemId</i> specifies the system identifier of the external
subset. If you specify an empty string as the <i>systemId</i>, 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">createDocument</a>()
function to create a <a href="qdomdocument.html">QDomDocument</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 <a href="qdomdocument.html#createElement">QDomDocument.createElement</a>(),
is called. The document also becomes non-null when setContent() is
called.</p>
<p><b>See also</b> <a href="qdomimplementation.html#createDocument">createDocument</a>().</p>


<h3 class="fn"><a name="hasFeature" />bool QDomImplementation.hasFeature (<i>self</i>, QString&#160;<i>feature</i>, QString&#160;<i>version</i>)</h3><p>The function returns true if QDom implements the requested
<i>version</i> of a <i>feature</i>; otherwise returns false.</p>
<p>The currently supported features and their versions:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Feature</th>
<th>Version</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>XML</td>
<td>1.0</td>
</tr>
</table>


<h3 class="fn"><a name="invalidDataPolicy" /><a href="qdomimplementation.html#InvalidDataPolicy-enum">InvalidDataPolicy</a> QDomImplementation.invalidDataPolicy ()</h3><p>Returns the invalid data policy, which specifies what should be
done when a factory function in <a href="qdomdocument.html">QDomDocument</a> is passed invalid data.</p>
<p><b>Warning:</b> This function is not <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qdomimplementation.html#setInvalidDataPolicy">setInvalidDataPolicy</a>()
and <a href="qdomimplementation.html#InvalidDataPolicy-enum">InvalidDataPolicy</a>.</p>


<h3 class="fn"><a name="isNull" />bool QDomImplementation.isNull (<i>self</i>)</h3><p>Returns false if the object was created by <a href="qdomdocument.html#implementation">QDomDocument.implementation</a>();
otherwise returns true.</p>


<h3 class="fn"><a name="setInvalidDataPolicy" />QDomImplementation.setInvalidDataPolicy (<a href="qdomimplementation.html#InvalidDataPolicy-enum">InvalidDataPolicy</a>&#160;<i>policy</i>)</h3><p>Sets the invalid data policy, which specifies what should be
done when a factory function in <a href="qdomdocument.html">QDomDocument</a> is passed invalid data.</p>
<p>The <i>policy</i> is set for all instances of <a href="qdomdocument.html">QDomDocument</a> which already exist and which
will be created in the future.</p>
<pre class="cpp">
 <span class="type"><a href="qdomdocument.html">QDomDocument</a></span> doc;
 <span class="type"><a href="qdomimplementation.html">QDomImplementation</a></span> 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<span class="operator">.</span>setInvalidDataPolicy(<span class="type"><a href="qdomimplementation.html">QDomImplementation</a></span><span class="operator">.</span>AcceptInvalidData);
 <span class="type"><a href="qdomelement.html">QDomElement</a></span> elt1 <span class="operator">=</span> doc<span class="operator">.</span>createElement(<span class="string">"foo~bar"</span>);

 <span class="comment">// This will create an element with the tag name "foobar".</span>
 impl<span class="operator">.</span>setInvalidDataPolicy(<span class="type"><a href="qdomimplementation.html">QDomImplementation</a></span><span class="operator">.</span>DropInvalidData);
 <span class="type"><a href="qdomelement.html">QDomElement</a></span> elt2 <span class="operator">=</span> doc<span class="operator">.</span>createElement(<span class="string">"foo~bar"</span>);

 <span class="comment">// This will create a null element.</span>
 impl<span class="operator">.</span>setInvalidDataPolicy(<span class="type"><a href="qdomimplementation.html">QDomImplementation</a></span><span class="operator">.</span>ReturnNullNode);
 <span class="type"><a href="qdomelement.html">QDomElement</a></span> elt3 <span class="operator">=</span> doc<span class="operator">.</span>createElement(<span class="string">"foo~bar"</span>);
</pre>
<p><b>Warning:</b> This function is not <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qdomimplementation.html#invalidDataPolicy">invalidDataPolicy</a>()
and <a href="qdomimplementation.html#InvalidDataPolicy-enum">InvalidDataPolicy</a>.</p>


<h3 class="fn"><a name="__eq__" />bool QDomImplementation.__eq__ (<i>self</i>, <a href="qdomimplementation.html">QDomImplementation</a>)</h3><h3 class="fn"><a name="__ne__" />bool QDomImplementation.__ne__ (<i>self</i>, <a href="qdomimplementation.html">QDomImplementation</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>