It´s not something "rocket science", i think this will work for you, it´s not very pretty...
 
with your code snippet...
 
 
IMarshallingContext mctx =
bfact.createMarshallingContext();
mctx.setIndent(10);
//-------
((Customer)obj).setLocation(null);
//-------
mctx.marshalDocument(obj, "UTF-8", null, new FileOutputStream("Output.xml"));


 

Reply via email to