Wing Yew Poon wrote:
Namespaces are your friends. Why do you want to get rid of them?

------------------------------------------------------------------------
*From:* temp temp [mailto:[EMAIL PROTECTED]
*Sent:* Friday, February 29, 2008 3:03 PM
*To:* [email protected]
*Subject:* saving xml withour namesapce

Xml Beans saves xml with the namespace.


<FundingOppSynopsis xmlns="http://some.comp/service/grants <http://reisys.com/ndgrants/schema/service/grantsgov>">
can I save the xml without this namesapce ? is it possible ?
miro

------------------------------------------------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20> Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.
Hi
this sample code from xmlbeans mailing list can help,


HashMap noPrefixMap = new HashMap();
noPrefixMap.put("http://some.comp/service/grants <http://reisys.com/ndgrants/schema/service/grantsgov>", "");
org.apache.xmlbeans.XmlOptions opts = new org.apache.xmlbeans.XmlOptions();
opts.setSavePrettyPrint();
opts.setSavePrettyPrintIndent(4);
opts.setSaveSuggestedPrefixes(noPrefixMap);
yourDocument.save(fileOutputStream, opts);

-youssef

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to