XML optional package overview

The JSR-172: J2ME™ Web Services JAXP package was first introduced in Series 40 3rd Edition Feature Pack 1.

As XML is increasingly used to link networked clients with remote enterprise data, the JSR-172 XML parsing optional package provides XML parsing support for the Java™ ME platform.

The JSR-172 XML parsing optional package allows:

  • Referencing a platform’s given parser implementation

  • Applications to receive parse events

  • Using SAX 2.0 API classes and interfaces

The JSR-172 XML parsing optional package is a subset of the JAXP 1.2 package. A full implementation of JAXP in CLDC was not possible due to the restrictions on computing resources and storage space. The XML optional package meets the following requirements:

  • Support for SAX 2.0. Support for SAX 1.0 was not considered since it was deemed that SAX 2.0 would be enough for all use cases.

  • No support for the Document Object Model (DOM). This is due to the higher memory requirements of DOM, which normally needs to contain the whole parsed tree in memory.

  • Support for XML namespaces.

  • Support for at least UTF-8 and UTF-16 character encodings.

  • No support for XSLT. This was considered unnecessary and too resource intensive in the context of CLDC-devices.

  • Optional DTD validation. Implementations are free to include support for DTD validation. In general this process is demanding in terms of memory and processing power, so most devices will not support it. However, non-validating parsers have to support the minimal requirements when encountering an internal DTD.