users@jaxb.java.net

Re: While parsing with JAXB, sub branch is coming null

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Mon, 8 Nov 2010 17:59:03 +0100

Please remove the xmlns=",,,commands" from the <command> element and try
unmarshalling. If I haven't missed something, this will bring the element
into the correct (according to the XML schema) namespace.

In the schema, there is indeed xmlns:q1="http://jabber.org/protocol/commands",
but the prefix q1 isn't used anywhere, so this is just dead freight.

-W


<command xmlns="http://jabber.org/protocol/commands"


On 8 November 2010 17:31, olamalam <ilker.cikrikcili_at_aspone.co.uk> wrote:

>
> Hi to all,
>
> Actually, I'm not new to JAXB :) however I've faced with a problem for the
> first time and couldn't solve it.
>
> I"m using Java 1.6.0_18 and the xml file I'm trying to parse and it's
> schema
> are attached. I created the class files by using "xjc" command properly but
> when I parse the file, the first tag is returned with correct values at
> "id", "to", "from" and "type" fields but "command" object returns null. I
> also tried parsing it with xmlBeans but I got the same problem there too.
> (I'm going to ask the same question to xmlBeans forum)
>
> Can you see what I'm missing?
>
> http://old.nabble.com/file/p30162263/getProfile.xml getProfile.xml
> http://old.nabble.com/file/p30162263/getProfile.xsd getProfile.xsd
> --
> View this message in context:
> http://old.nabble.com/While-parsing-with-JAXB%2C-sub-branch-is-coming-null-tp30162263p30162263.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
>
>