|
Kev's Development Toolbox |
|
| Development Utils: | Back |
| XML Formatted Viewer |
| Overview | ||||||
|
Formats xml source that is pasted into the main display area.
|
||||||
| Description | ||||||
|
I developed this application for debugging xml data being sent between systems. Sometimes when xml is output to the console for debugging purposes it is not in the easiest format to read - this app reformats the xml to be in a hierachical tree and displays it in both an editable text area and a graphical tree. It will take xml formatted in any way, for example:
|
||||||
| Running the app | ||||||
|
Unzip the XMLFormattedViewer.zip to a directory on your machine. 1. On a jdk 1.4+ platform (already includes JAXP1.1 apis), from the directory where you unzipped the zip file, run from a command line: java kh.XMLFormattedViewer 2. on a Java platform prior to 1.4: the JAXP1.1 api, Xerces1.3.1 and Xalan J2.3.1 are included in the lib directory. The
supplied run_xerces.bat Please read the |
||||||
| Editing the XML source directly | ||||||
|
The app will format the xml as soon as it is pasted into the text area. To edit the xml
directly (or to type the xml source directly into the window rather than pasting it in),
uncheck the 'Validate XML' check box in the bottom left to turn off the validate (unchecked =
no validation). When you want to validate and formatted the xml, check the box to turn back on.
|
||||||
| Handling Spaces and empty text elements | ||||||
|
If your source element contains a lot of empty text elements, and or spurious tab characters
or spaces, the app can strip these out to give a cleaner format - press the 'Strip Spaces' button
to do this.
|
||||||
| Screenshots | ||||||
|
1. Main application window
2. Main window showing unformatted xml source pasted in:
3. Fomatted text view:
4. Formatted text and tree view:
|