XML with eXchaNGeR
|
|
|||
|
|
Sign up to receive this and other networking newsletters in your inbox.
One of the biggest dangers I encounter in writing this newsletter is becoming fascinated with the products and services I look at. I can find a new tool, start reading, get really interested, feel compelled to install it, play around, get really, really interested and suddenly discover that the better part of a day has passed.
That's exactly what happened when I came across eXchaNGeR (XNGR) (xngr.org/ and on SourceForge at sourceforge.net/projects/xngr).
The tool's author, Edwin Dankert, describes the eXchaNGeR XML Browser as an open source Java framework that visualizes elements in an XML Document. The user can either browse through and manage the visible elements in the document with external services, or make changes to the content of the XML Document with the built-in XML editor.
Installing XNGR is simple (we'll outline Windows installation here but there's also a tarred version for other platforms). First, download the ZIPped distribution from xngr.org/downloads.htm and un-ZIP into the subdirectory of your choice (let the un-ZIPper create the paths specified in the archive).
Then download the services that add Simple Object Access Protocol, Scalable Vector Graphics and e-mail functionality and then the examples. Using the same starting directory you chose for the program un-ZIP all of these files, again allowing the un-ZIPper to create the paths.
You then load XNGR by running the supplied batch file and you are presented with the Explorer interface. This is where documents get added to categories (this is just to help you organize document collections and you can also add and delete categories) and where the documents in a category are listed.
To add services you invoke the XNGR Desktop interface from the Explorer menu and add services as needed. So far available examples services include SOAP, SVG, XHTML, e-mail, an address browser and an address editor.
You can load documents from local drives or download them by URL and even create new documents using the simple but workable built-in editor.
A document's element hierarchy can be displayed in the Explorer document window as long as it is successfully validated. Validation requires referencing the URL of an XML namespace that defines the elements used in the document. If validation can't be done then the document can only be edited or its structure displayed.
Furthermore, an action can be associated with an element - for example, e-mail addresses can be associated with an e-mail service simply be registering the service (note that the example e-mail service provided is just a dummy for demo purposes that does nothing).
All of these neat features don't apply to documents that can't be validated.
Right clicking on a document offers a menu that includes editing the XML source with the built-in editor, reloading the document, moving the document to a category or deleting the document from the XNGR browser (but not from disk).
By right clicking on a document element in the Explorer document you can open the item, select from any of the available open operations associated with that element type (for the address example the choice are edit and browse), select the default open operation, select which action to apply to the element and examine the element's properties.
This is a really interesting tool and I suspect immensely useful for development. Now I must go and do some work...
RELATED LINKS
Network World, 10/14/02
Mark Gibbs is a consultant, author, journalist, and columnist. He writes the weekly Backspin and Gearhead columns in Network World.
Mark Gibbs is a consultant, author, journalist, and columnist. He writes the weekly Backspin and Gearhead columns in Network World. Gibbs is also co-conspirator of the Vitally Important Information Web site.
Gibbs can be contacted at webapps@gibbs.com. Press releases to pr@gibbs.com.
