A connected device has, at a minimum, 512KB of read-only memory (ROM), 256KB of random
access memory (RAM), and some kind of network connection. The CDC is designed for devices
like television set-top boxes, car navigation systems, and high-end PDAs. The CDC specifies
that a full JVM (as defined in the Java Virtual Machine Specification, 2nd edition) must be
supported.
CDC is developed under the Java Community Process. For more information on the CDC,
see http://java.sun.com/products/cdc/. A Linux reference of CDC 1.0.1 implementation is
available now.
CDC 1.0.1 is the basis of the Personal Profile 1.0 stack. The Personal Profile 1.0 increases
the minimum memory requirement to 2.5MB of ROM and 1MB of RAM, and requires a robust
network plus a GUI display on a device that can support applet display.
CDC 1.1 is currently a work in progress. It will support Personal Profile 1.1 and will introduce
APIs to match the level of JDK 1.4.
You can use XML parsers in J2ME applications to interface with an existing XML service. For example, you could get a customized view of news on your phone from an aggregator site that summarizes headlines and story descriptions for a news site in XML format.
XML parsers tend to be bulky, with heavy run time memory requirements. In order to adapt to the MIDP environment, XML parsers must be small to meet the resource constraints of MIDP-based devices. They should also be easily portable, with minimum effort required to port them to MIDP.
Two frequently used XML parsers for resource-constrained devices are kXML and NanoXML. kXML is written exclusively for the J2ME platform (CLDC and MIDP). As of version 1.6.8 for MIDP, NanoXML supports DOM parsing. (See Resources for links to NanoXML and kXML.)
There are several performance issues that you should keep in mind while deploying XML parsing in a MIDP application: