This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes How to remove unused namespace in XML generated from JAXB marshalling ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to remove unused namespace in XML generated from JAXB marshalling ?" Watch "How to remove unused namespace in XML generated from JAXB marshalling ?" New topic
Author

How to remove unused namespace in XML generated from JAXB marshalling ?

rs veera
Greenhorn

Joined: May 09, 2009
Posts: 2
Hi,

My spring applicationcontext.xml contains marshaller bean as below.

<oxm:jaxb2-marshaller id="marshaller" contextPath="com.example1.xsd:com.example2.xsd" />

com.example1.xsd and com.example2.xsd contains two different namespace xsd's not related to each other. When marshalling JAXB object present in path com.example1.xsd. Am getting an xml contains namesapce used in com.example2.xsd also which is never used in the output xml.

How to avoid those unwanted namspace present in XML.

Please help on this.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to remove unused namespace in XML generated from JAXB marshalling ?
 
Similar Threads
jaxb, calendar, and marshalling issue
how to get XML form javaobject using JAXB
JAXB VALIDATION
Spring Batch Issue
jaxb, marshalling, and java.util.calendar