What Java XML Parser is for easy processing?

I am creating XML in a Java application. I am considering various XML parsing options. I am not going to do anything more than cross the structure and extract values โ€‹โ€‹from it. I need to use one of them built into the Java API (1.5+) without any additional plugins. I do not need to create โ€œeventsโ€ or convert them to something else. I do not create XML, just reading and retrieving data. I also do not apply the scheme.

Sun provides a list here, but it's not entirely obvious what I should use.

http://java.sun.com/developer/technicalArticles/xml/JavaTechandXML/

What would be the most appropriate XML API to use in this case? Jaxp? Jdom XPath?

+3
source share
9

, DOM XML , .

XPath, API .

JAXP XML- , JDK. JAXP (P ) JAXB (B ).

, DOM, . JDOM DOM4J.

+4

IMO - JAXP XPath. Java 5.0 JAXP 1.3, . . .

+2

, XStream, ThoughtWorks. mvc, VRaptor, xml. : http://x-stream.imtqy.com/

+1

DOM parser - , , . node

+1

DOM, , , xpath. , xml, , , .

SAX- Stax (xml pull parsing), java-. . xml . , " xy " " xy "

+1

DOM Parser . .

+1

XOM.

xpath.

0

- SAX- .

0

It seems that SAX is the API you want.

Google "SAX Parsing" and you will find many examples.

0
source

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


All Articles