TaminoApi4J

I would have an advice from who is more addicted in the tamino/xml world than me.
Using the TaminoApi4J is better a dom model or a jdom model?

Thanks @nto

Hi @nto,

this is a simple question, which is actually not simple to answer. There are arguments for DOM and JDOM, depending which is your point of view.

Let me outline my view of things and I invite the others to add their experience to this:

:slight_smile: Usage: In a Java world (which TaminoAPI4J is) JDOM is a lot easier to use, because you do not need to do so much indirections and typing (Checkout squirk’s posting). DOM really implements the specification and you need a lot of method calls and intermediate objects to get where you want to.

:slight_smile: Reliability: Both objectmodels are sort of mature. However, the JDOM package is still called “Beta 8” (!) and nothing happened since this version came out for a long time. So my feeling is that the drive behind this development is gone. If you are happy with Beta 8, then this is not really a problem, but if you find a bug in JDOM Beta 8 (as we did recently), the chance to get a fixed version pretty soon are not very high. Now you always can take the source and fix it for yourself, but who wants to do that?

:slight_smile: Performance: There is really no big difference between DOM and JDOM concerning speed and memory usage. Depending on the testscenario sometimes DOM is better other times JDOM is better. So here is no real argument for one or the other.

:slight_smile: TaminoAPI4J: The API really does not care, which object model you use. The Handling on the API level (dealing with documents) is the same for both models.

Any other thoughts about this?

Cheers, Christian.

[This message was edited by Christian Gengenbach on 08 Jan 2003 at 16:45.]

Hi all,

Funny you don’t mention DOM4J, Christian.

TaminoAPI4J supports only a rather old version
of jdom.
In JavaTaminoAPIExamples.jar (part of TaminoAPI4J)
you supply an object model for DOM4J.
I’ve just tried it out, and it seems to work fine.

With dom4j (as well as jdom) you may use jaxen to navigate in your document through xpath expressions.
Attention: Although the TaminoAPI4J client doesn’t use jdom, jdom.jar has to be supplied in the classpath.

It would be interesting to know Which java model TaminoAPI4J will support in upcoming releases.


Cheers,

Hokan

Hokan Arvidsson says:
"TaminoAPI4J supports only a rather old version
of jdom"

Yesterday i installed on my machine the new version of jdom (beta8) but i get many errors, the answer is perhaps that taminoAPI4J is too old?
Is there a new version of TAMINOAPI4J?

If this will be the thruth i think i’ll chose dom…help me.
ThankSSSS
@nto

I think another point is that DOM is a W3C standard. Although not so “nice” to use in Java, it might be good if you have multiple components to work together (some maybe from external partners) and they all agree on a STANDARD.

Because that’s exactly what JDOM (and DOM4J) is NOT. Its a nice implementation but no standard.

As long as you don’t care about that its more a matter of personal taste and style. :slight_smile:

If your TaminoAPI4J is not working with the current JDOM beta 8, I suggest a request in the Java API forum because these people can tell you what goes wrong…

regards

christian campo

An answer to @nto:

The Tamino API for Java V4.1.1, which has been released with Tamino XML Server V4.1 in December 2002, supports JDOM Beta 8 (the most recent JDOM version available).

Cheers, Christian.