Python Forum
XML files and tables - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: XML files and tables (/thread-29766.html)



XML files and tables - mauede - Sep-19-2020

I have benn asked to write a Python program to parse XML files recorded in a database, look for specific keywords and sentences, extract the associated value and compare it with the correspondent value stored in tables.

I would greatly appreciate any code example, and tutorial dealing with:
• accessing a database
• reading an XML file
• extracting values associated to specific nodes in the XML file
• accessing data organized in a table whose rows ann columns have headers

Thank you in advance


RE: XML files and tables - ndc85430 - Sep-19-2020

For processing XML, there's ElementTree in the standard library. Which database are you using? You'll need to find a library that can talk to it. As for the output, I'm not aware of libraries here, but if you're just producing text output, it's probably not too hard to write yourself.