Hello Tim, Thanks for your reply.

I'm developing an integration project and I created that xsd file from the
xml file that our client sends us. I tried several different tools but none
of them creates a targetnamespace from the xml file that I attached. When I
try to assign a namespace manually I'm getting invalid xsd errors. 

But yes, you are right, there must be stg wrong with the xsd since I'm
having the same problem with Jaxb too. 

In the Jaxb forum, they advised me to remove xmlns="..." field from the tags
of xml. This is maybe why my xsd doesnt have a targetnamespace. Removing
xmlns fields from the each xml file received by my system programatically is
not a very practical solution. Therefore I guess I need to assign a
targetnamespace to my xsd. What should I put there?

Thanks again,
ilker


Tim Watts-3 wrote:
> 
> I could be wrong, but the odd thing I noticed was that the .xsd doesn't
> have a targetNamespace attr. I don't think simply declaring a namespace
> in the .xsd makes it part of the xml schema being defined. But maybe I'm
> misunderstanding your intent. It looks like you're trying to define a
> schema that spans multiple namespaces and I"m not sure that's supported
> in XML Schema. I'd love to learn otherwise.
> 
> 
> On Mon, 2010-11-08 at 08:27 -0800, olamalam wrote:
>> Hi to all,
>> 
>> Actually, I'm not new to XmlBeans :) however I've faced with a problem
>> for
>> the first time and couldn't solve it.
>> 
>> I"m using xmlBeans 2.4.0 and the xml file I'm trying to parse and it's
>> schema are attached. I created the .jar file by using "scomp" 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 JaxB but I got the same problem there
>> too. (I'm going to ask the same question to Jaxb forum)
>> 
>> Can you see what I'm missing?
>> 
>> http://old.nabble.com/file/p30162231/getProfile.xml getProfile.xml 
>> http://old.nabble.com/file/p30162231/getProfile.xsd getProfile.xsd 
> 
> ________
> It does not matter how slowly you go so long as you do not stop.
> -- Confucius
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/While-parsing-with-xmlBeans%2C-sub-branch-is-coming-null-tp30162231p30169075.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to