xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Peter Stibrany" <pstibrany AT gmail.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] XML Schema validation via JAXP
- Date: Sun, 12 Aug 2007 20:18:54 +0200
Hello,
Re 2: Installing custom error handler helped me to solve my problem on
JDK 1.6. Thank you!
Re 1: why is XMLReaderFactory preferred over SAXParserFactory
approach? If I would use XMLReaderFactory, I would need to rely on
implementation-specific features to use schema validation.
Thank you for your suggestions,
-Peter
On 8/12/07, Elliotte Harold <elharo AT metalab.unc.edu> wrote:
> Peter Stibrany wrote:
>
> > This works for me in Java 1.5, where it throws ParsingException when
> > document isn't valid. Unfortunately, on Java 6 it returns parsed
> > document even if it is invalid with respect to schema.
> >
>
> 1. I suggest using XMLReaderFactory instead of SAXParserFactory, though
> that likely won't fix the problem.
>
> 2. You probably need to install your own SAX ErrorHandler that throws an
> exception if the document is invalid.
>
> --
> Elliotte Rusty Harold elharo AT metalab.unc.edu
> Java I/O 2nd Edition Just Published!
> http://www.cafeaulait.org/books/javaio2/
> http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>
-
[XOM-interest] XML Schema validation via JAXP,
Peter Stibrany, 08/11/2007
-
Re: [XOM-interest] XML Schema validation via JAXP,
Elliotte Harold, 08/11/2007
-
Re: [XOM-interest] XML Schema validation via JAXP,
Peter Stibrany, 08/12/2007
-
Re: [XOM-interest] XML Schema validation via JAXP,
Elliotte Harold, 08/12/2007
- Re: [XOM-interest] XML Schema validation via JAXP, Peter Stibrany, 08/13/2007
-
Re: [XOM-interest] XML Schema validation via JAXP,
Elliotte Harold, 08/12/2007
-
Re: [XOM-interest] XML Schema validation via JAXP,
Peter Stibrany, 08/12/2007
- <Possible follow-up(s)>
- Re: [XOM-interest] XML Schema validation via JAXP, Peter Stibrany, 08/11/2007
-
Re: [XOM-interest] XML Schema validation via JAXP,
Elliotte Harold, 08/11/2007
Archive powered by MHonArc 2.6.24.