Hi Tommaso, tommaso.agnol...@gmail.com wrote on 03/16/2009 02:16:33 PM:
> Hi, > > I need to use the LSSerializer provided by xerces to serialize a DOM > document subtree without namespaces completion processing, i.e., the > desired output is just the xml serialization of the subtree as one > could extract it by selection from the whole document serialization. > > To this end, if I understood well, setting the property "namespaces" > to "false" the normalization algorithm described in Appendix B1 of > Dom Level 3 specification should be skipped. > > I'm using this code: > > but it doesn't have effect. > > What is wrong? Hard to say. You haven't shown us the document you're serializing or the result from serialization. That might help. > Is the "namespaces" properties setting working in > Xerces LSSerializer implementation ? Xalan now provides the LSSerializer (serializer.jar) for Xerces. Disabling the "namespaces" parameter is supposed to work but I can't say I've ever tried it myself. > DOMImplementationLS impl = (DOMImplementationLS)registry. > getDOMImplementation("LS"); > LSSerializer writer = impl.createLSSerializer(); > DOMConfiguration domConfig = writer.getDomConfig(); > domConfig.setParameter("namespaces",Boolean.FALSE); > String str = writer.writeToString(node); > > Thanks for any help, > > Tommaso Thanks. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org