Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XML and Java

2 views
Skip to first unread message

rhino

unread,
Jul 12, 2008, 2:42:02 PM7/12/08
to
I'm getting very interested in XML, especially in using Java to create and
update XML files. However, the documents I'm reading about XML at IBM
Developer Works are, for the most part, quite dated with dates in 2002 and
earlier being typical.

How do I find out what the current practices are on XML and how to work with
it in Java? I don't want to waste a lot of time trying to figure out how to
use tools and techniques that have long since been replaced by far better
techniques. For example, having to use DOM to read an entire XML document in
order to insert a single element seems like a pretty dubious way of doing
something. It reminds me of storing data on magnetic tape and having to read
through most of the tape to add information to it. This seems more like the
1960s than the first decade of the 21st century. I have to assume that
someone has come up with better approaches by now.

I was also intrigued by Xindice but I'm not clear if this is a popular
approach or just an idea that never really amounted to anything.

Does anyone have any insights for me? Or suggestions on where to get good
information on this subject?

--
Rhino


Jürgen Kahrs

unread,
Jul 12, 2008, 3:15:47 PM7/12/08
to
rhino wrote:

> For example, having to use DOM to read an entire XML document in
> order to insert a single element seems like a pretty dubious way of doing
> something. It reminds me of storing data on magnetic tape and having to read
> through most of the tape to add information to it. This seems more like the
> 1960s than the first decade of the 21st century. I have to assume that
> someone has come up with better approaches by now.

This is a nice comparison. I'm looking forward to
answers from the Java/XML experts in this newsgroup.
I'm not a Java expert, but my first guess would be
that in many cases there is no way for you to avoid
using a DOM.

Joseph J. Kesselman

unread,
Jul 18, 2008, 4:34:49 PM7/18/08
to
rhino wrote:
> I'm getting very interested in XML, especially in using Java to create and
> update XML files. However, the documents I'm reading about XML at IBM
> Developer Works are, for the most part, quite dated with dates in 2002 and
> earlier being typical.

The basic APIs haven't changed very much since then.

> For example, having to use DOM to read an entire XML document in
> order to insert a single element seems like a pretty dubious way of doing
> something.

That's a classic example of a task which may be better handled by using
SAX-based processing rather than a DOM... which is, in fact, similar to
your tape analogy. See discussion of SAX vs. DOM at
http://www.w3.org/DOM/faq.html#SAXandDOM

On the other hand, if you're going to do a lot of this, XML may be the
wrong data representation. It's perfectly reasonable, and often
desirable, to use XML as your format for communicating data between
applications but to use something more specialized within the
application... a custom data structure, or a database. (Plug: IBM's DB2
now has native support for both relational AND XML-structural data.
Claimer: I'm with IBM, and contributed some of the ideas to that effort.)

> I was also intrigued by Xindice but I'm not clear if this is a popular
> approach or just an idea that never really amounted to anything.

I don't know the status of that particular project. It's an Apache
effort, so it probably has a mailing list for its users/contributors;
that'd be the best place to ask to find out current status. The website
says the most recent official version was released December of last year.

jimmy Zhang

unread,
Aug 3, 2008, 9:59:20 PM8/3/08
to
Here is the link to VTD-XML, the latest XML procesisng technology that might
interest you..
http://vtd-xml.sf.net

"rhino" <No.offline.c...@anonymous.com> wrote in message
news:g5atsq$j02$1...@news.datemas.de...

Peter Flynn

unread,
Aug 4, 2008, 6:47:46 PM8/4/08
to
jimmy Zhang wrote:
> Here is the link to VTD-XML, the latest XML procesisng technology that might
> interest you..
> http://vtd-xml.sf.net

*plonk*

///Peter

0 new messages