JAXB 2.0 do no generate XML declaration

D

David Portabella

This Blog,
http://weblogs.java.net/blog/kohsuke/archive/2005/10/101_ways_to_mar.html

mentions that to remove (do not generate) the XML declaration (<?xml
....>),
you can set this property.
m.setProperty("jaxb.fragment", Boolean.TRUE);

With this, the XML declaration is not generated, but there is a
problem:
the last elements are not closed.
So, instead of producing:

<e1>
<e11 />
<e12>
<e121 />
</e12>
</e1>
-------------
it is producing:

<e1>
<e11 />
<e12>
<e121
-------------
i.e., it is not closing the tasks.

So, is it this a correct way to remove the XML declaration,
but there is some problem anywhere?
m.setProperty("jaxb.fragment", Boolean.TRUE);

--
Or, what is the correct way to do this?

ps: I am using jwsdp-2.0

Regards,
DAvid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top