Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] JDK 1.5 with xom and no external parser

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] JDK 1.5 with xom and no external parser
  • Date: Sat, 14 Aug 2004 20:49:58 -0700

The problem is that I don't want to require Java 1.5 (or JAXP 1.2.6, which also has these renamed packages) to compile or run XOM. Thoughts? Suggestions?

I guess there's no way round the compile time requirement. Try this:

- Have build.xml only compile JDK15XML1_0Parser into the jar if the java version matches 1.5
- Do a Class.forName trick at runtime to detect if com.sun.org.apache.xerces.internal.parsers.SAXParser is available (simply checking for java.version 1.5 might break a future IBM JDK)
- When you make a release compile on 1.5 with the javac 1.4 compat switches on





Archive powered by MHonArc 2.6.24.

Top of Page