users@jaxb.java.net

Re: cvc-elt.1: Cannot find the declaration of element. Unmarshaling nested el

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Sat, 16 May 2009 09:52:18 +0200

Does your XML schema define <twoelement> as a top-level element? If it
occurs only as a child of <oneelment> it's not valid as a document on its
own, i.e., the validator doesn't know that you are filtering things away.
-W

On Fri, May 15, 2009 at 11:11 PM, skov <skov_at_inbox.ru> wrote:

>
> Hi,
> I stacked with Cannot find the declaration of element. erorr
> when I enable validation on jaxb.
> I have valid XML document against schema.
> I have no problem unmarshaling whole document with validation.
> But I am trying to unmarshal only specific element inside xml file.
> For example i have
> <xml>
> <oneelement>
> <twoelement>
>
> </twoelement>
> </oneelement>
> </xml>
>
> So I am filtering events and only unmarshal twoelemet element.
> It works fine without validation but when I enable validation setting
> schmea
> to Unmarshaller it throws that cvc-elt.1: Cannot find the declaration of
> element. twoelement.
>
> Any suggestions please
> --
> View this message in context:
> http://www.nabble.com/cvc-elt.1%3A-Cannot-find-the-declaration-of-element.-Unmarshaling-nested-el-tp23567358p23567358.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>