Search notes:

VBA: MSXML and DOM - selectNodes

option explicit

sub main() ' {

   dim doc as new MSXML2.DOMDocument

   doc.loadXML(                             _
     "<items>"                            & _
     "  <fruit id='1000'>Apple</fruit>"   & _
     "  <fruit id='1002'>Cherry</fruit>"  & _
     "  <city  id='2000'>Paris</city>"    & _
     "  <fruit id='1001'>Banana</fruit>"  & _
     "  <city  id='2001'>Berlin</city>"   & _
     "  <city  id='2002'>Z�rich</city>"   & _
     "</items>")


    dim fruits as msxml2.IXMLDOMSelection
    set fruits = doc.selectNodes("//fruit")

    dim fruit as msxml2.IXMLDOMElement
    for each fruit in fruits
        debug.print("Fruit with id " & fruit.getAttribute("id") & " is " & fruit.text)
    next fruit

end sub ' }
Github repository about-VBA, path: /object-libraries/MSXML/DOM/selectNodes.bas

See also

selectSingleNode(…)
selectSingleNode() then selectNodes()
MSXML and DOM

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759407208, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/VBA/Useful-object-libraries/MSXML/DOM/selectNodes(69): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78