Search notes:

Python standard library: xml.dom.minidom

from xml.dom import minidom

xml_data = """
<foo>
    <bars>
        <bar id="bar 01">one  </bar>
        <bar id="bar 02">two  </bar>
        <bar id="bar 02">three</bar>
    </bars>
    <baz>bbbaazzz</baz>
</foo>
"""

#  Alternatively, to parse a file, use minidom.parse(file_name)
xmldoc = minidom.parseString(xml_data)


for bar in xmldoc.getElementsByTagName('bar'):
    print("id " + bar.attributes['id'].value + " = " + bar.childNodes[0].nodeValue)
Github repository about-python, path: /standard-library/xml/dom/minidom/script.py

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...', 1759390122, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/standard-library/xml/dom/minidom(51): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78