Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] dtd problems

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: luca <passani AT eunet.no>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] dtd problems
  • Date: Mon, 20 Sep 2004 12:28:17 +0200



luca wrote:

I now realize that this is not totally true, since I buffer the
string from the response and I could try to remove the DTD reference
completely. Anyway, this would be a hack and I think you
just have to implement a way to tell XOM to ignore DTDs no
matter what. This is defying the purpose of XOM being
the tool for 80% of everyone's XML tasks

OK, this hack worked. I remove the DTD reference manually.
No more waiting for 10 seconds. Of course, I would still like to see XOM
fixed too,

Posting the code for the archive (or in case someone has a smarter
way to suggest):

int dtd_idx_wml = mark_up.indexOf("<!DOCTYPE wml PUBLIC");
int dtd_idx_html = mark_up.indexOf("<!DOCTYPE html PUBLIC");
if ( dtd_idx_wml != -1) {
int idx = mark_up.indexOf("\">");
String substr1 = mark_up.substring(0,dtd_idx_wml);
String substr2 = mark_up.substring(idx+2);
mark_up = substr1+substr2;

}

if (dtd_idx_html != -1) {
int idx = mark_up.indexOf("\">");
String substr1 = mark_up.substring(0,dtd_idx_html);
String substr2 = mark_up.substring(idx+2);
mark_up = substr1+substr2;
}

thanks

Luca






Archive powered by MHonArc 2.6.24.

Top of Page