Java Reference
In-Depth Information
One feed that can be used to test the application is the one from the Toronto Star news-
paper. The following command searches it for items with titles that mention the word
“snow”:
java RssFilter http://www.thestar.com/rss/000-082-672?searchMode=Lineup snow
Comments in the application's source code describe its functionality.
XOM's design is strongly informed by one overriding principle: enforced simplicity.
On the website for the class library, Harold states that XOM “should help inexperienced
developers do the right thing and keep them from doing the wrong thing. The learning
curve needs to be really shallow, and that includes not relying on best practices that are
known in the community but are not obvious at first glance.”
The new class library is useful for Java programmers whose Java programs require a
steady diet of XML.
Summary
Today, you learned the basics of another popular format for data representation,
Extensible Markup Language (XML), by exploring one of the most popular uses of
XML—RSS feeds.
In many ways, Extensible Markup Language is the data equivalent of the Java language.
It liberates data from the software used to create it and the operating system the software
ran on, just as Java can liberate software from a particular operating system.
By using a class library such as the open source XML Object Model (XOM) library, you
can easily create and retrieve data from an XML file.
A big advantage to representing data using XML is that you will always be able to get
that data back. If you decide to move the data into a relational database or some other
form, you can easily retrieve the information. The data being produced as RSS feeds can
be mined by software in countless ways, today and in the future.
You also can transform XML into other forms such as HTML through a variety of tech-
nology, both in Java and through tools developed in other languages.
 
Search WWH ::




Custom Search