[jdom-interest] Thanks everyone!

kevin.schmidt at convergys.com kevin.schmidt at convergys.com
Tue Nov 13 05:15:52 PST 2001


I would like to thank everybody for answering my question, and also share a
little story of my JDOM experience with everyone.  I have a website,
www.bluedragontavern.com, which has over 11,000 complete album mp3s which
can be both downloaded and streamed over the web.  I have most of them
categorized, and I was storing the information in ".dat" files, 1 per song!
So, I finally woke up and realized that 1 XML file would be a much better
way to hold this data that 11,000 DAT files. (For those of you thinking
right now that I should be using database, it really does not require that
level of complexity, and i dont want to be making SQL calls all the time.)
My website is written mostly in Perl, and so I set off trying to use
XML::DOM and XML::XPath perl modules.  I quickly discovered that
Activestate's XML modules were sadly out of dat and very buggy, so then I
tried switching everything over to Cygwin's perl distribution and tried
using CPAN.pm to get the XML modules.  Not much luck there either.  After
hours of fussing with make scripts and compiling garbage by hand, I got
most of them installed(The perl module dependencies run deep), and all but
a few testcases failed.  I wrote my rebuildXmlDat.pl script and it seemed
very slow(around 300 seconds), and it would blow up somewhere in deep in
XML::XPath.  So, from a guy who usually says, "Perl ROCKS", my motto is
now, "Perl SUCKS, and is a dying language".  I started rewiting my script
using JBuilder, JDOM, and Jaxen.  All I can say is, "WOW".  Java is truely
the ruling language of the universe!  It takes JDOM/Jaxen 80-90 seconds
what took Perl well over 300 seconds.  I use to think that Perl was a
faster language than Java, but no more.  Here are the scripts for those
interested:

(See attached file: rebuildXML.pl)(See attached file: RebuildXML.java)

And here is what my XML looks like:
<?xml version="1.0" encoding="UTF-8"?>
<mp3s>
   <Artist name="10,000 Maniacs" Alternative="+">
      <Album name="Blind Man's Zoo">
         <Song name="10,000 Maniacs - Blind Man's Zoo - 01 - Eat for Two.mp3" />
...

Again, I would like to thank Brett and Jason, and everyone else involved in
the JDOM and Jaxen projects!
     -Kevin Schmidt
     Cincinnati, OH


--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rebuildXML.pl
Type: application/octet-stream
Size: 5789 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20011113/dc2c05fe/rebuildXML.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RebuildXML.java
Type: application/octet-stream
Size: 10173 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20011113/dc2c05fe/RebuildXML.obj


More information about the jdom-interest mailing list