[jdom-interest] More JDK 1.1 incompatibilities in Beta 4

Patrick Dowler Patrick.Dowler at nrc.ca
Wed Jun 14 09:51:11 PDT 2000

On Wed, 14 Jun 2000, barry_shultz at hp.com wrote:
> (2) Document and Element methods getSerializedForm()
>  throw UnsupportedOperationException
> Idea:
> throw new java.lang.RuntimeException("Unsupported")

Nooooooo!!!!! Whenever one degardes a specific type of exception to 
a general one and forces the programmer to parse Strings, the compiler
can't tell if you are doing it right... if the operations is not supported, then
UnsupportedOperationException is correct. 

For such simple classes as exceptions, where all the functionality is in
the class heirarchy itself, a much better alternative for this is to write the
exception class and make sure the class loader finds it. I recall that you had
to make sure classses.zip was in your classpath, so you  should just be able
to add "missing-from-1.1.jar" to that...

I don't know for sure, since I gave up on 1.1.x as soon as I could :-)


Patrick Dowler
Canadian Astronomy Data Centre

Received: from ns0.decode.is (IDENT:root at ns0.decode.is [])
	by dorothy.denveronline.net (8.9.3/8.9.3) with ESMTP id EAA28233
	for <jdom-interest at jdom.org>; Wed, 14 Jun 2000 04:40:14 -0600 (MDT)
From: jon.a.gudmundsson at decode.is
Received: (from root at localhost)
	by ns0.decode.is (8.9.3/decode) id KAA03714
	for jdom-interest at jdom.org; Wed, 14 Jun 2000 10:40:12 GMT
Received: from grunnur.decode.is (decode.decode.is [])
	by ns0.decode.is (8.9.3/decode) with ESMTP id KAA03629
	for <jdom-interest at jdom.org>; Wed, 14 Jun 2000 10:40:10 GMT
To: jdom-interest at jdom.org
X-Mailer: Lotus Notes Release 5.0.3 (Intl) 21 March 2000
Message-ID: <OF5B876661.9E32AB5F-ON802568FE.0034B18B at decode.is>
Date: Wed, 14 Jun 2000 09:39:04 +0000
X-MIMETrack: Serialize by Router on DHDDOM/Decode/IS(Release 5.0.3 (Intl)|21 March 2000) at
 14.06.2000 10:39:48
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
X-scanner: scanned by Inflex 0.1.5 - (http://www.inflex.co.za/)
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by ns0.decode.is id KAA03714
Subject: [jdom-interest] Getting String from a Document
Sender: jdom-interest-admin at jdom.org
Errors-To: jdom-interest-admin at jdom.org
X-BeenThere: jdom-interest at jdom.org
X-Mailman-Version: 2.0beta2
Precedence: bulk
List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org>

Hi all,

I am using beta 4 to process and create XML files. My problem is that I am
creating a stand alone class that will create XML from some parameters and
I want the member functions to return a String object containing the XML,
as the class doesn´t know whether the XML will be written to file or
whatever. I am unable to find a way to to this, as the XMLOutputter only
uses OutputStreams..

does anyone know how this can be done ?


*  Jón Arnar Guðmundsson
*  Software Engineer          / Hugbúnaðarhönnuður
*  deCODE Genetics, Inc.  / Íslensk Erfðagreining

More information about the jdom-interest mailing list