M
M
mrdrkot2020-07-23 10:19:21
Python
mrdrkot, 2020-07-23 10:19:21

How to display DOM - XML ​​representation - of a document in Python 3?

Good afternoon!

Mastering XPath, I found out that when making XPath queries, we are traveling through the DOM - representation of the XML - file, and not through the file itself. This results in unexpected responses to XPath queries. To understand why this or that answer came, it would be good to have the DOM representation of the XML document in front of your eyes. I've been digging the Internet since the evening, I can't find how to display this very idea. I would like to be able to receive something like this:

5f19397e337f6886531266.png

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-07-23
@dimonchik2013

lxml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question