<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # QDomAttr Class Reference ## [[QtXml](index.htm) module] 該QDomAttr類表示的一個屬性[QDomElement](qdomelement.html)。[More...](#details) 繼承[QDomNode](qdomnode.html)。 ### Methods * `__init__ (self)` * `__init__ (self, QDomAttr?x)` * `QString name (self)` * `QDomNode.NodeType nodeType (self)` * `QDomElement ownerElement (self)` * `setValue (self, QString)` * `bool specified (self)` * `QString value (self)` * * * ## Detailed Description 該QDomAttr類表示的一個屬性[QDomElement](qdomelement.html)。 例如,下面的XML片段的產生與沒有孩子,但兩個屬性的元素: ``` <link href="http://qt.nokia.com" color="red" /> ``` 您可以訪問這樣的代碼元素的屬性: ``` [QDomElement](qdomelement.html) e = //... //... QDomAttr a = e.attributeNode("href"); cout << a.value() << endl; // prints "http://qt.nokia.com" a.setValue("http://qt.nokia.com/doc"); // change the node's attribute QDomAttr a2 = e.attributeNode("href"); cout << a2.value() << endl; // prints "http://qt.nokia.com/doc" ``` 這個例子還表明,改變從一個元件接收的屬性改變元素的屬性。如果您不希望更改元素的屬性的值必須使用[cloneNode](qdomnode.html#cloneNode)( )來獲得屬性的獨立副本。 QDomAttr可以返回[name](qdomattr.html#name)()和[value](qdomattr.html#value)一個屬性() 。一個屬性的值設置[setValue](qdomattr.html#setValue)( ) 。如果[specified](qdomattr.html#specified)( )返回True值被設置[setValue](qdomattr.html#setValue)( ) 。該節點將該屬性附加到(如果有的話)是由返回[ownerElement](qdomattr.html#ownerElement)( ) 。 關于文檔對象模型有進一步的信息[http://www.w3.org/TR/REC-DOM-Level-1/](http://www.w3.org/TR/REC-DOM-Level-1/)和[http://www.w3.org/TR/DOM-Level-2-Core/](http://www.w3.org/TR/DOM-Level-2-Core/)。對于更一般介紹的DOM實現的見[QDomDocument](qdomdocument.html)文檔。 * * * ## Method Documentation ``` QDomAttr.__init__ (self) ``` 構造一個空屬性。 ``` QDomAttr.__init__ (self, QDomAttr?x) ``` 構造的副本_x_。 副本的數據是共享的(淺拷貝) :修改一個節點也將改變其他。如果你想使一個深拷貝,使用[cloneNode](qdomnode.html#cloneNode)( ) 。 ``` QString QDomAttr.name (self) ``` 返回屬性的名稱。 ``` QDomNode.NodeType QDomAttr.nodeType (self) ``` [](qdomnode.html#NodeType-enum) [Returns](qdomnode.html#NodeType-enum) [AttributeNode](qdomnode.html#NodeType-enum)。 ``` QDomElement QDomAttr.ownerElement (self) ``` [](qdomelement.html) [返回此屬性附加到或元素節點](qdomelement.html)[null node](qdomnode.html#isNull)如果這個屬性沒有連接到任何元素。 ``` QDomAttr.setValue (self, QString) ``` 設置該屬性的值_v_。 **See also** [value](qdomattr.html#value)( ) 。 ``` bool QDomAttr.specified (self) ``` 返回True如果該屬性已設置用戶使用[setValue](qdomattr.html#setValue)( ) 。如果未指定或設置該值,則返回False 。 **See also** [setValue](qdomattr.html#setValue)( ) 。 ``` QString QDomAttr.value (self) ``` 如果未指定該屬性返回屬性或空字符串的值。 **See also** [specified](qdomattr.html#specified)()和[setValue](qdomattr.html#setValue)( ) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看