␡
- Introduction
- XML: The Great Equalizer
- kXML: An Open Source XML Parser for J2ME
- The New and Improved AddressBook Application
- Changes to the AddressBook GUI
- Changes to the AddressDB Class
- Conclusion
- Additional Resources
The New and Improved AddressBook Application
The new AddressBook application loads an XML document from a remote HTTP server, parses it, and stores it in the local device database using the J2ME Record Management System. This document is named AddressBook.xml and its contents are as follows:
<?xml version="1.0"?> <AddressBook> <Contact> <name value="John Doe"/> <address value="123 Elm Street"/> </Contact> <Contact> <name value="Lisa Smith"/> <address value="742 Avenue B"/> </Contact> <Contact> <name value="Albert Einstein"/> <address value="853 Franklin Avenue"/> </Contact> <Contact> <name value="Bryan Morgan"/> <address value="101 Scenic Highway"/> </Contact> <Contact> <name value="Marc Robards"/> <address value="741 Highway 101"/> </Contact> </AddressBook>
Because the application now has two options for loading the Address database (from local storage or from a remote XML file), we need to change the AddressBook GUI slightly.