users@jaxb.java.net

Re: how to obtain namespace of the unmarshalled object?

From: Eric Ma <eric.ma_at_db.com>
Date: Mon, 21 Apr 2003 12:14:10 -0400

OK, that explains it. Thanks Ryan.

Eric




                      Ryan Shoemaker -
                      JavaSoft East To: JAXB-INTEREST_at_JAVA.SUN.COM
                      <Ryan.Shoemaker_at_S cc:
                      un.COM> Subject: Re: how to obtain namespace of the unmarshalled object?
                      Sent by:
                      Discussion list
                      for the Java
                      Architecture for
                      XML Binding
                      <JAXB-INTEREST_at_JA
                      VA.SUN.COM>


                      04/21/03 12:08 PM
                      Please respond to
                      Discussion list
                      for the Java
                      Architecture for
                      XML Binding






Eric Ma wrote:
> I did exactly that and nothing happened for me. On a related note, I also did
>

Can you be more specific? I just tried your sample app and got the schemaLocation
attribute in the marshalled xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<purchaseOrder orderDate="1999-10-20-05:00"
     xsi:schemaLocation="myNamespace http://my.com"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     ...

> Marshaller.setProperty(Marshaller.JAXB_FORMATED_OUTPUT, Boolean.TRUE) and I did not get an formatted output. Any suggestions?
>

I threw some returns in the output above for readability, but in general the
difference between formatted and unformatted output in JAXB 1.0 FCS is simply
line breaks - it doesn't indent, but it will in the next release.

Thanks,

--Ryan





--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.