What parsing method does XMLTextReader use?

What analysis method does XMLTextReader use? I'm confused. Sax or Dom?

+3
source share
3 answers

Neither one is pull parser . It does not create a full object model in memory (DOM) and does not analyze the entire document without raising events that the client can respond to (SAX).

Instead, the client controls the parsing by asking the parser to do a little more reading, then check its status and respond accordingly, and then ask it to read a little more, etc.

+9
source

, SAX Java- api. - - push, XmlTextReader .

DOM - W3C,.NET DOM 1 2. XmlDocument, XmlTextReader.

XmlTextReader XML ( Java StAX), SAX/push. , , , , (, SAX pull, ).

+2

DOM XML- .

SAX XML- . , , .

The XMLTextReader reads one XML token at a time, so it is closer to SAX, but it does not provide callbacks.

+1
source

Source: https://habr.com/ru/post/1705469/


All Articles