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?
, DOM XML , .
XPath, API .
JAXP XML- , JDK. JAXP (P ) JAXB (B ).
, DOM, . JDOM DOM4J.
IMO - JAXP XPath. Java 5.0 JAXP 1.3, . . .
, XStream, ThoughtWorks. mvc, VRaptor, xml. : http://x-stream.imtqy.com/
DOM parser - , , . node
DOM, , , xpath. , xml, , , .
SAX- Stax (xml pull parsing), java-. . xml . , " xy " " xy "
DOM Parser . .
XOM.
xpath.
- SAX- .
It seems that SAX is the API you want.
Google "SAX Parsing" and you will find many examples.
Source: https://habr.com/ru/post/1795608/More articles:Providing a C ++ library for Python + PIL - c ++Join tables based on foreign keys - databaseunit test in C ++ - c ++Toggle background view - androidksoap2 error sending complex object - javaProblem transferring data from Javascript to Flex - javascriptFast SQL query for months - sqlHow to include php source line number in user error message? - htmlGet PHP to display only warnings and errors - phpForm.Owner is installed from a separate thread in .NET 3.5 - multithreadingAll Articles