国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > XML > 正文

XmlNodeList

2024-09-05 20:55:43
字體:
來源:轉載
供稿:網友

returns an xmlnodelist containing a list of all descendant elements that match the specified name.

overload list
returns an xmlnodelist containing a list of all descendant elements that match the specified name.

[visual basic] overloads overridable public function getelementsbytagname(string) as xmlnodelist
[c#] public virtual xmlnodelist getelementsbytagname(string);
[c++] public: virtual xmlnodelist* getelementsbytagname(string*);
[jscript] public function getelementsbytagname(string) : xmlnodelist;
returns an xmlnodelist containing a list of all descendant elements that match the specified localname and namespaceuri.

[visual basic] overloads overridable public function getelementsbytagname(string, string) as xmlnodelist
[c#] public virtual xmlnodelist getelementsbytagname(string, string);
[c++] public: virtual xmlnodelist* getelementsbytagname(string*, string*);
[jscript] public function getelementsbytagname(string, string) : xmlnodelist;
example
[visual basic, c#] the following example creates a xmldocument object and uses the getelmentsbytagname method and the resulting xmlnodelist object to display all the book titles.

[visual basic, c#] note   this example shows how to use one of the overloaded versions of getelementsbytagname. for other examples that may be available, see the individual overload topics.
[visual basic]
option explicit
option strict

imports system
imports system.io
imports system.xml

public class sample
    
    public shared sub main()
        'create the xmldocument.
        dim doc as new xmldocument()
        doc.load("books.xml")
        
        'display all the book titles.
        dim elemlist as xmlnodelist = doc.getelementsbytagname("title")
        dim i as integer
        for i = 0 to elemlist.count - 1
            console.writeline(elemlist(i).innerxml)
        next i
    end sub 'main
end class 'sample
[c#]


using system;
using system.io;
using system.xml;

public class sample
{
  public static void main()
  {
    //create the xmldocument.
    xmldocument doc = new xmldocument();
    doc.load("books.xml");

    //display all the book titles.
    xmlnodelist elemlist = doc.getelementsbytagname("title");
    for (int i=0; i < elemlist.count; i++)
    {   
      console.writeline(elemlist[i].innerxml);
    }  

  }
}
[c++, jscript] no example is available in c++ or jscript. to view a visual basic or c# example, click the language filter button  in the upper-left corner of the page.
 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 福海县| 图木舒克市| 黑河市| 梧州市| 陇南市| 于田县| 长垣县| 南投县| 屯昌县| 潮安县| 金秀| 封开县| 宜昌市| 贡嘎县| 漯河市| 固原市| 南汇区| 吉隆县| 永年县| 任丘市| 和林格尔县| 太白县| 来宾市| 察哈| 南澳县| 资溪县| 高碑店市| 紫阳县| 巨野县| 泗洪县| 吐鲁番市| 巴中市| 昌邑市| 乌兰察布市| 吴桥县| 中阳县| 元朗区| 凤庆县| 北碚区| 栖霞市| 贵定县|