Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there faster XML parsers in Java than Xalan/Xerces [closed]

I haven't found many ways to increase the performance of a Java application that does intensive XML processing other than to leverage hardware such as Tarari or Datapower. Does anyone know of any open source ways to accelerate XML parsing?

like image 862
McGovernTheory Avatar asked Jun 06 '09 19:06

McGovernTheory


People also ask

Which XML parser is more memory efficient?

The SAX event-based parser is faster and consumes far less memory than the DOM parser; consequently, it allows developers to parse the data out of an XML document more effectively.

What is xalan and Xerces?

Answer. What are Xalan-Java and Xerces2-Java? These are 3rd party software which are used by the Sterling MCF product - Xalan-Java is an XSLT processor for transforming XML documents into HTML, text, or other XML document types. Xerces2-Java is a library for parsing, validating and manipulating XML documents.

How many types of XML parsers are available in Java?

There are two types of XML parsers namely Simple API for XML and Document Object Model.


2 Answers

Take a look at Stax (streaming) parsers. See the sun reference manual. One of the implementations is the woodstox project.

like image 91
Kees de Kooter Avatar answered Nov 16 '22 00:11

Kees de Kooter


Since it hasn't been directly mentioned, I'll throw in Aalto, which is fastest java xml parser according to some measurements, like:

  • JVM-serializers (which compares, XML, JSON, protobuf, Thrift etc etc)
  • Alternative serialization methods for WSTest (Java web services)

which are not written by Aalto developers.

like image 24
StaxMan Avatar answered Nov 16 '22 00:11

StaxMan