PythonQt.QtXmlPatterns.QXmlName · declarations 001
Back to PythonQt.QtXmlPatterns.QXmlName
fromClarkName
fromClarkName(clarkName: str, namePool: Any) -> Any
X.fromClarkName(clarkName, namePool) -> PythonQt.QtXmlPatterns.QXmlName
Supplemental documentation: Qt 5 reference:
[static] QXmlName QXmlName::fromClarkName(const QString \&clarkName, const QXmlNamePool \&namePool)
Converts clarkName into a QXmlName, inserts into namePool, and returns it.
A clark name is a way to present a full QName with only one string, where the namespace cannot contain braces. Here are a couple of examples:
| Clark Name | Description |
|---|---|
html |
The local name html, in no namespace |
http://www.w3.org/1999/xhtmlhtml |
The local name html, in the XHTML namespace |
http://www.w3.org/1999/xhtmlmy:html |
The local name html, in the XHTML namespace, with the prefix my |
If the namespace contains braces, the returned value is either invalid or has undefined content.
If clarkName is an invalid name, a default constructed QXmlName is returned.
This function was introduced in Qt 4.5.
See also toClarkName().
Upstream PySide2 reference signatures (binding differences may apply):
fromClarkName(clarkName: str, namePool: PySide2.QtXmlPatterns.QXmlNamePool) -> PySide2.QtXmlPatterns.QXmlName
Source: https://doc.qt.io/archives/qt-5.15/qxmlname.html#fromClarkName
isNCName
isNCName(candidate: str) -> bool
X.isNCName(candidate) -> bool
Supplemental documentation: Qt 5 reference:
[static] bool QXmlName::isNCName(const QString \&candidate)
Returns true if candidate is an NCName. An NCName is a string that can be used as
a name in XML and XQuery, e.g.,
the prefix or local name in an element or attribute, or the name of a variable.
See also Namespaces in XML 1.0 (Second Edition), [4] NCName.
Upstream PySide2 reference signatures (binding differences may apply):
isNCName(candidate: str) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qxmlname.html#isNCName
isNull
isNull() -> bool
X.isNull() -> bool
Supplemental documentation: Qt 5 reference:
bool QXmlName::isNull() const
Returns true if this QXmlName is not initialized with a valid combination of namespace URI, local name, and prefix.
A valid local name is always required. The prefix and namespace URI can be empty, but if the prefix is not empty, the namespace URI must not be empty. Local names and prefixes must be valid NCNames, e.g., abc.def or abc123.
Upstream PySide2 reference signatures (binding differences may apply):
isNull(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qxmlname.html#isNull
localName
localName(query: Any) -> str
X.localName(query) -> str
Supplemental documentation: Qt 5 reference:
QString QXmlName::localName(const QXmlNamePool \&namePool) const
Returns the local name.
Note that for efficiency, the local name string is not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the local name.
Upstream PySide2 reference signatures (binding differences may apply):
localName(self, query: PySide2.QtXmlPatterns.QXmlNamePool) -> str
Source: https://doc.qt.io/archives/qt-5.15/qxmlname.html#localName
namespaceUri
namespaceUri(query: Any) -> str
X.namespaceUri(query) -> str
Supplemental documentation: Qt 5 reference:
QString QXmlName::namespaceUri(const QXmlNamePool \&namePool) const
Returns the namespace URI.
Note that for efficiency, the namespace URI string is not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the namespace URI.
Upstream PySide2 reference signatures (binding differences may apply):
namespaceUri(self, query: PySide2.QtXmlPatterns.QXmlNamePool) -> str
Source: https://doc.qt.io/archives/qt-5.15/qxmlname.html#namespaceUri
prefix
prefix(query: Any) -> str
X.prefix(query) -> str
Supplemental documentation: Qt 5 reference:
QString QXmlName::prefix(const QXmlNamePool \&namePool) const
Returns the prefix.
Note that for efficiency, the prefix string is not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the prefix.
Upstream PySide2 reference signatures (binding differences may apply):
prefix(self, query: PySide2.QtXmlPatterns.QXmlNamePool) -> str
Source: https://doc.qt.io/archives/qt-5.15/qxmlname.html#prefix
toClarkName
toClarkName(query: Any) -> str
X.toClarkName(query) -> str
Supplemental documentation: Qt 5 reference:
QString QXmlName::toClarkName(const QXmlNamePool \&namePool) const
Returns this QXmlName formatted as a
Clark Name. For example, if the local name is html, the prefix is x, and the
namespace URI is http://www.w3.org/1999/xhtml/, then the Clark Name returned is:
{http://www.w3.org/1999/xhtml/}x:html.
If the local name is MyWidget and the namespace is empty, the Clark Name returned is:
MyWidget
Note that for efficiency, the namespace URI, local name, and prefix strings are not stored in the QXmlName but in the QXmlNamePool that was passed to the constructor. Hence, that same namePool must be passed to this function, so it can be used for looking up the three string components.
This function can be useful for debugging.
See also XML Namespaces, James Clark and fromClarkName().
Upstream PySide2 reference signatures (binding differences may apply):
toClarkName(self, query: PySide2.QtXmlPatterns.QXmlNamePool) -> str
Source: https://doc.qt.io/archives/qt-5.15/qxmlname.html#toClarkName