If you just use XmlOptions.setUseDefaultNamespace(), it will still include the default namespace marker at the top like so:
<deliveries_report xmlns="..."> ... </deliveries_report> This isn't what you asked for in your email, but is probably what you want. If however you're dealing with a dumb XML parser that isn't namespace-aware or something like that, then you can suppress even it by telling XmlBeans that the default namespace has already been set. See the XmlOptions.setSaveImplicitNamespaces() method. -- Mark Lewis On Wed, 2005-10-19 at 19:40 +0000, R. C. Hill wrote: > Does anyone know how to stript out the namespace prefixes when saving the > output of an XmlBean. I'm using the saver to save to file, but I would like > it to so without the name space prefix. Can this be done through the > XmlOptions class? If so, how? > > Right now the output of the XmlBean looks something like: > > <del:deliveries_report > xmlns:del="http://www.something.com/metrics/report/deliveries"> > <del:scheduled_deliveries> > <del:month>2005-06</del:month> > <del:product> > <del:name>SomeName</del:name> > <del:uploads>0</del:uploads> > <del:files>0</del:files> > <del:megabytes>0.0</del:megabytes> > </del:product> > </del:scheduled_deliveries> > </del:deliveries_report> > > I would like it to look like: > > <deliveries_report> > <scheduled_deliveries> > <month>2005-06</month> > <product> > <name>SomeName</name> > <uploads>0</uploads> > <files>0</files> > <megabytes>0.0</megabytes> > </product> > </scheduled_deliveries> > </deliveries_report> > > Thanks, > - RH > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today - it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

