Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] baseURI / systemID question

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: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] baseURI / systemID question
  • Date: Mon, 13 Sep 2004 14:02:21 -0700



I'd be tempted to file a bug report with Sun on this one. There's no reason URL encoding should take longer than XML parsing. It's a very straightforward operation. I could write my own code to create file URLs from a File object. However, I'd be very nervous about getting it wrong on some platforms, and also causing problems if Sun ever updates their VM so this operation works reasonably.


Maybe there's a misunderstanding here...

Builder.build(File) does indeed have its own inefficient hacky code to create file URLs from a File object (using URLEncoder in a very inefficient manner). This piece of XOM code is the performance problem. The standard java way File.toURI().toString() does not show the performance regression (but requires JDK 1.4).





Archive powered by MHonArc 2.6.24.

Top of Page