QXmlStreamAttributeclass represents a single XML attribute. 更多 …
def
__eq__
(other)
def
__ne__
(other)
def
isDefault
()
def
name
()
def
namespaceUri
()
def
prefix
()
def
qualifiedName
()
def
value
()
An attribute consists of an optionally empty
namespaceUri(),name(),value(), and anisDefault()属性。The raw XML attribute name is returned as
qualifiedName().
QXmlStreamAttribute
¶
QXmlStreamAttribute(namespaceUri, name, value)
QXmlStreamAttribute(qualifiedName, value)
QXmlStreamAttribute(arg__1)
- param namespaceUri
unicode
- param qualifiedName
unicode
- param name
unicode
- param arg__1
- param value
unicode
Creates an empty attribute.
Constructs an attribute in the namespace described with
namespaceUri
with
name
and value
value
.
Constructs an attribute with qualified name
qualifiedName
and value
value
.
PySide2.QtCore.QXmlStreamAttribute.
isDefault
(
)
¶
bool
返回
true
if the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returns
false
.
PySide2.QtCore.QXmlStreamAttribute.
name
(
)
¶
QStringRef
Returns the attribute’s local name.
PySide2.QtCore.QXmlStreamAttribute.
namespaceUri
(
)
¶
QStringRef
Returns the attribute’s resolved , or an empty string reference if the attribute does not have a defined namespace.
PySide2.QtCore.QXmlStreamAttribute.
__ne__
(
other
)
¶
other
–
QXmlStreamAttribute
bool
Compares this attribute with
other
并返回
true
if they are not equal; otherwise returns
false
.
PySide2.QtCore.QXmlStreamAttribute.
__eq__
(
other
)
¶
other
–
QXmlStreamAttribute
bool
Compares this attribute with
other
并返回
true
if they are equal; otherwise returns
false
.
PySide2.QtCore.QXmlStreamAttribute.
prefix
(
)
¶
QStringRef
Returns the attribute’s namespace prefix.
另请参阅
PySide2.QtCore.QXmlStreamAttribute.
qualifiedName
(
)
¶
QStringRef
Returns the attribute’s qualified name.
A qualified name is the raw name of an attribute in the XML data. It consists of the namespace
prefix()
, followed by colon, followed by the attribute’s local
name()
. Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn’t use , but the resolved
namespaceUri()
and the attribute’s local
name()
.
PySide2.QtCore.QXmlStreamAttribute.
value
(
)
¶
QStringRef
Returns the attribute’s value.