The original does not have the namespace in it. I add the namespace as validateOptions just to allow the xml document to load (I couldn't get it to load without it). The problem is on the save it adds the namespace regardless. I would like it to not add it. Thanks
----- Original Message ---- From: Jacob Danner <[EMAIL PROTECTED]> To: [email protected] Sent: Monday, November 26, 2007 7:24:52 PM Subject: Re: How to not add namespace on save I'm confused, does the instance you are parsing already have the namespace defined? Why is the namespace being set as the default? Thx, -jacobd On 11/26/07, bob bob <[EMAIL PROTECTED]> wrote: > I have an xml bean that I load an xml document by adding the namespace > programatically (because the xml document never has it). > XmlOptions validateOptions = new XmlOptions(); > validateOptions.setErrorListener(validationErrors); > HashMap ns = new HashMap(); > ns.put("", "http://skywiresoftware.com/ccm/global"); > validateOptions.setLoadSubstituteNamespaces(ns); > xmlini = XMLINIDocument.Factory.parse(new > File("war/WEB-INF/xml/global.xml"), validateOptions); > > problem is, when I save the xml document, it saves the xmlns and I don't > want it to. How do I save an xml document using xml beans without putting > the xmlns in it? > Here's the save code; > XmlOptions saveOptions = new XmlOptions(); > saveOptions.setUseDefaultNamespace(); > xmlini.save(new File("war/WEB-INF/xml/global.xml"), > saveOptions); > > Thx. > > > > ____________________________________________________________________________________ > Be a better sports nut! Let your teams follow you > with Yahoo Mobile. Try it now. > http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ____________________________________________________________________________________ Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. http://overview.mail.yahoo.com/

