I am creating the root normally. And then, before marshalling I am using PrefixMapped(This is from Kohsuke's work around to remove namespace prefix). Could this be causing problem? Here is my marshalling method. Thanks, Marshaller m = jc.createMarshaller(); m.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, "schemalocation/myschema.xsd"); DataWriter writer = new DataWriter( new OutputStreamWriter(new FileOutputStream(fileName),"UTF-8"), "UTF-8" ); // create prefix mapper, and set prefixes. PrefixMapper pm = new PrefixMapper(writer); pm.setPrefix("mynamespace",""); // put namespace foo without a prefix m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(root, pm); }catch( ValidationException ue ) { logger.error( "Caught ValidationException"+ue ); } catch( JAXBException je ) { je.printStackTrace(); } catch( IOException ioe ) { ioe.printStackTrace(); }--- On Fri 09/26, Ryan
Shoemaker - JavaSoft East < Ryan.Shoemaker_at_Sun.COM > wrote:From: Ryan Shoemaker - JavaSoft East [mailto: Ryan.Shoemaker_at_Sun.COM]To: users_at_jaxb.dev.java.netDate: Fri, 26 Sep 2003 10:06:49 -0400Subject: Re: Formatted XML Contentbmadhuri wrote:> > Thanks, Ryan!> I am using version 1.0.1. But still could not get the indentation.If possible, send me a sample app that reproduces the problem andI'll look into it some more.Thanks,--Ryan---------------------------------------------------------------------To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.netFor additional commands, e-mail: users-help_at_jaxb.dev.java.net
_______________________________________________
No banners. No pop-ups. No kidding.
Introducing My Way -
http://www.myway.com