S
S
Sergey Nizhny Novgorod2017-06-09 16:00:42
Python
Sergey Nizhny Novgorod, 2017-06-09 16:00:42

What is tree traversal based on when parsing HTML?

Hello everyone
Can you explain how the HTML tree is traversed during parsing? I always thought that it was based on regular expressions, but I was told that it uses a different principle.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
airamkad, 2017-06-09
@airamkad

There are different methods
https://www.sitepoint.com/community/t/sax-vs-xpath...
The browser uses the DOM for sure.
In some of your private tasks, it may make sense to use SAX (it consumes much less resources).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question