Enhydra's kXML is a great little XML parser with a small footprint, making it perfect for J2ME apps. It uses a unique method of DOM manipulation and parsing called "pull parsing." Find out whether kXML is must-have for your toolbox.
by Robert Cadena
April 4, 2003
was recently working on a project to develop a multiplayer game for J2ME devices. In this application communication from the server to the device was originally coded as simple key-value pairs separated by ampersands (&), much as Flash handles retrieving variables from servers, but as I began handling more complicated and nested data structures I found this method insufficient. It became difficult to write and error prone.
To solve that problem I immediately decided to recode the transport for the application using XML. XML was a natural choice for me not only because I had used it to transport messages across the network to applets in a previous project, but because XML is easy to debug and write by hand. It also, of course, lets you structure the data in a richer fashion. However, I didn't know that I was about to discover a valuable new gem for my coder's toolbox.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!