ExtractXMLList()

语法

ExtractXMLList(Node, List() [, Flags])
概要
Extract elements from the given XML node into the specified List(). The list will be cleared before extracting the elements.

参数

Node The XML node containing the list data.
List() The list to fill with the XML elements. Any previous content of the list will be lost.
Flags (optional) If this parameter is set to #PB_XML_NoCase then the comparison of XML node and attribute names is performed case insensitive. The default is to be case sensitive.

返回值

无.

Remarks

The extraction is performed recursively if the list has a structure type. The XML nodes must have the form described in the InsertXMLList() function. Nodes with different names are ignored by the extraction.

示例

  Xml$ = "<list><element>1</element><element>10</element><ELEMENT>100</ELEMENT></list>"
  
  If ParseXML(0, Xml$) And XMLStatus(0) = #PB_XML_Success
    NewList Values()
    ExtractXMLList(MainXMLNode(0), Values(), #PB_XML_NoCase)
    
    ForEach Values()
      Debug Values()
    Next
  Else
    Debug XMLError(0)
  EndIf

参阅

InsertXMLList(), ExtractXMLArray(), ExtractXMLMap(), ExtractXMLStructure()

已支持操作系统

所有

<- ExtractXMLArray() - XML Index - ExtractXMLMap() ->