XML パーサーの利用

 2016/9/1 (木)    

Dim pXmlPropertySet As IXmlPropertySet2
Set pXmlPropertySet = New XmlPropertySet
pXmlPropertySet.SetXml strBuffer
 
Debug.Print pXmlPropertySet.CountX("Response/Placemark")
 
Dim i As Integer
For i = 1 To pXmlPropertySet.CountX("Response/Placemark")
 
strWork(0) = pXmlPropertySet.SimpleGetProperty("Response/Placemark[@id='p" & i &/Point/coordinates")                  '経緯度
strWork(1) = pXmlPropertySet.SimpleGetProperty("Response/Placemark[@id='p" & i &/AddressDetails/Country/AddressLine") '変換文字列
 
Debug.Print strWork(0), strWork(1)
 
 
Next i

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.