-
July 17th, 2008, 01:39 AM
#1
add more than one namespace in XML
hi
I am generating XMl file using XmlEans. I have written :
File outputFile = new File(RSSFile);
XmlOptions options = new XmlOptions();
options.setSavePrettyPrint();
options.setSavePrettyPrintIndent(2);
Map m = new HashMap();
m.put("xmlns:n","http://www.w3.org/2001/XMLSchema-instance");
m.put("xmlns:nav","http://g.sys.com/rss/nRSS");
options.setUseDefaultNamespace();
options.setSaveAggressiveNamespaces();
options.setLoadAdditionalNamespaces(m);
rssDoc.save(outputFile, options );
but it is not adding this two namespace in the XMl file. It only add the default namespace.How to add mroe than one namespace?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|