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]

Reply via email to