Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: jaxb vs jaxp for XML validation

From: dave <ceek63@-----.--->
To: Michael Glavassevich <mrglavas@--.---.--->, xmlschema-dev@--.---
Date: 12/6/2007 12:19:00 AM

does it mean one needs to parse the XML twice: 
  once from JAXP for constraint validation
  once more from JAXB for marshal/unmarshal operations

If this is true, Isn't it better to opt for XmlBeans
where you get the functionality of both JAXP and JAXB
with just one processing?

cheers!
-D
--- Michael Glavassevich <mrglavas@c...> wrote:

> 
> You're assuming that has to be an 'or'. It doesn't.
> You can provide a JAXP
> javax.xml.validation.Schema to a JAXB 2.0
> Unmarshaller and it will validate
> the documents it unmarshals using the schema you
> specified.
> 
> Thanks.
> 
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@c...
> E-mail: mrglavas@a...
> 
> xmlschema-dev-request@w... wrote on 11/28/2007
> 09:04:49 PM:
> 
> > Given an XSD schema with key/keyref constraints,
> > which XML processing to use- JAXB or JAXP?
> >
> >  JAXB is great because I get Marshal/Unmarshal
> > capability. But JAXB 1.0 doesn't seem to support
> > Key/Keyref constraint validation. JAXP seems to
> > support this Key constraint validation in XSD.
> But,
> > one has to implement Marshal/Unmarshal which
> doesn't
> > come free here.
> >
> >  Obviously in my case, I do need to construct Java
> > object for the incoming XML and vice-versa.
> >
> >
> >
> >
>
____________________________________________________________________________________
> 
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> 
> 
> 
> 



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

From ceek63@y... Thu Dec 06 19:14:30 2007
Received: from maggie.w3.org ([193.51.208.68])
	by fri


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent