Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] can xom help with theses two problems

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: teknokrat <teknokrat AT yahoo.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] can xom help with theses two problems
  • Date: Thu, 22 Jun 2006 13:06:43 +0100

Tatu Saloranta wrote:
--- teknokrat <teknokrat AT yahoo.com> wrote:

We are dealing with legacy xml feeds and have run
across two problems that are making our lives difficult.

1. leading spaces before the <?xml declaration. Is
it possible for xom to strip these out?

2. We get given DOCTYPE declarations that do not
point to a correct DTD. This breaks XOM even though we ask for a non
validating parser.

Others have already answered with most of the details,
but this last entry has one more related intricacy.
Unfortunately, even when not validating, XML spec
mandates couple of things to be done based on DTD, by
parsers capable of validation. Specifically, attribute
typing and value normalization. At least that's what
Xerces does, and as a result, what newer parsers tend
to do (since Xerces pretty much defines de facto
standard mode of processing in Java, IMO).

The easiest way to work around that is, like was
already said, by defining a custom entity resolver to
return something like empty content.

-+ Tatu +-


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

what exactly do you mean by empty content. The entity resolver interface returns and InputSource. I've tried it wil an InputStram that returns no data but that doesn't work.

cheers





Archive powered by MHonArc 2.6.24.

Top of Page