qt-xml

XML 元素指的是從(且包括)開始標籤直到(且包括)結束標籤的部分。

屬性通常提供不屬於數據組成部分的信息。

命名空間,使用前綴來避免命名衝突
<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>

XML Namespace (xmlns) 屬性
XML 命名空間屬性被放置於元素的開始標籤之中,並使用以下的語法:
xmlns:namespace-prefix=“namespaceURI”

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”,
告知XML解析器根據某個 schema 來驗證此文檔

XSD (xml Schema Definition)

[signal] void QTreeWidget::itemActivated(QTreeWidgetItem *item, int column)
This signal is emitted when the user activates an item by single- or double-clicking (depending on the platform, i.e. on the QStyle::SH_ItemView_ActivateItemOnSingleClick style hint) or pressing a special key (e.g., Enter).

void QXmlStreamReader::setDevice(QIODevice *device)
Sets the current device to device. Setting the device resets the stream to its initial state.

QXmlStreamReader::TokenType QXmlStreamReader::readNext()
Reads the next token and returns its type.

bool QXmlStreamReader::atEnd() const
Returns true if the reader has read until the end of the XML document,

QStringRef QXmlStreamReader::name() const
Returns the local name of a StartElement, EndElement, or an EntityReference.

QXmlStreamAttributes QXmlStreamReader::attributes() const
Returns the attributes of a StartElement.

QStringRef QXmlStreamAttributes::value(const QString &namespaceUri, const QString &name) const
Returns the value of the attribute name in the namespace described with namespaceUri,

QString QXmlStreamReader::readElementText(QXmlStreamReader::ReadElementTextBehaviour behaviour = ErrorOnUnexpectedElement)
Convenience function to be called in case a StartElement was read. Reads until the corresponding EndElement and returns all
text in-between.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章