Java: Marshalling Object — Removing extra ns2 annotation in xml
I am trying to marshall data within an object into an xml file based on a defined schema. However when I print out the xml file, I recieve extra annotations on the xml tags. Is there any way to get rid of the extra namespace annotation (i.e. ns2) This is an example of the xml I receive from marshalling. <?xml version="1.0" encoding="UTF-8" standalone="yes"> <root xmlns:ns2="http://www.something.com/something"> <ns2:food>steak</ns2:food> <ns2:beverage>water</ns2:beverage> </root> What I want is something like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"> <root xmlns="http://www