|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Saxon Serializing and COntentHandler
In Xalan I am able to do the following:
Serializer serializer = SerializerFactory.getSerializer (OutputPropertiesFactory.getDefaultMethodProperties("xml")); serializer.setOutputStream(System.out); xmlFilter2.setContentHandler(serializer.asContentHandler()); How will I acheive similar with Saxon8b. I tried using that ContentEmitter along with the ReceivingContentHandler (see below) but I dont think I am setting up the Configuration Object properly. Properties xep = new Properties();
NamePool np = NamePool.getDefaultNamePool();
Configuration config = new Configuration();
config.setNamePool(np);XMLEmitter xe = new XMLEmitter(); xe.setStreamResult(new StreamResult(new PrintWriter(System.out, true))); xe.setOutputProperties(xep); xe.setConfiguration(config); ReceivingContentHandler rch = new ReceivingContentHandler(); rch.setReceiver(xe); rch.setNamePool(np); xmlFilter2.setContentHandler(rch); xmlFilter2.parse(new InputSource("SouthPole.xml")); Neville --
==================================================================
Virtual Technology Corporation | 5510 Cherokee Rd, Suite 350
| Alexandria, VA 22312-2300
_/ _/_/_/_/_/_/_/_/_/ |
_/ _/ |
_/ _/ _/ _/_/_/_/ | Neville Thomas
_/ _/ _/ _/ | E-Mail addr: nthomas@xxxxxxxxx
_/ _/ _/ _/ | Office : 703.333.6233
_/_/ _/ _/ | Fax : 703.658.7057
_/ _/ _/_/_/_/ |
|
===================================================================
"Software and Systems Engineering Professionals."
===================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








