JDOM
A JDOM is a Java document object model. These are main links from a lecture 4 for JDOM:
1) jdom.org
2) dom4j.org
From the first one from http://www.jdom.org/dist/binary/ downloaded jdom-1.1.1.zip, jdom-contrib-1.1.1.zip and jdom-test-1.1.1.zip.
Also faq was useful.
The second link has more advertisements than new information.
Nice tutorial at the coffee machine blog provided an opportunity to work with xml file and create a new one.
First of all I unzipped jdom-1.1.1.zip, then in eclipse-java project-properties in build path added external jar from jdom-1.1.1/build/jdom.jar.
With help of the class JDOMDVD an output dvd.xml was successfully created. The other two examples (JDOMDVDTitles and JDOMDVDFilter) were also runned successfully. An interesting point was using JFileChooser, which makes working more pleasant even already being in eclipse.
Nice example at brics.dk – A Business Card editor.
Remembering about a source with using recipes.xml file, the main idea was underlined:
“DOM is too complicated to suit many programmers. Since it is a general API, it does not use special Java features – for example, existing collection classes are ignored. JDOM is designed to be simple and Java-specific. “
Example was checked (FirstRecipeJDOM), the source codes can be found here. And the information on that website is always short and clear.
Then I turned back to my favourite book and tested all examples in the appropriate chapter 14. Very nice. I learned a lot.