users@jaxb.java.net

Newbie Questions

From: Malachi de AElfweald <malachi_at_EOTI.ORG>
Date: Wed, 05 Mar 2003 14:27:04 -0700

I just downloaded and started playing with JAXB. Up until now, I have been using JDOM almost exclusively. I came across a couple things that I couldn't find answers to in the tutorial....

Marshaller.JAXB_FORMATTED_OUTPUT says it does line breaks and indentions. It is doing the line breaks, but not the indentions. Also, it is not consolidating empty elements (ie: <tag></tag> to <tag/>). The other thing I noticed was that it is using "ns1" as the namespace everywhere.

So, my questions are:
1) How to get it indenting so it is easier to read
2) how to get it to output <tag></tag> as <tag/>
3) how to get it to put "myNs"(or whatever) on the root element, and let the rest inherit from it?

As a side note, I also found a couple problems.

In the tutorial section for Javadoc customization of JAXB, it says "<<![CDATA[..."... There is one to many less-thans there.

Also, I was going to search the archives before deciding whether I wanted to join the discussion. That wasn't possible. The list should be readable to the general public in order to assist troubleshooting.

Thanks for any assistance you can provide,
Malachi