Here are the examples of the java api class com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXEventWriter taken from open source projects.
1. Bug6551616#test()
Project: openjdk
File: Bug6551616.java
File: Bug6551616.java
@Test public void test() throws Exception { final String XML = "" + "<?xml version='1.0'?>" + "<doc xmlns:foo='http://example.com/foo/' xml:lang='us-en'><p>Test</p></doc>"; javax.xml.parsers.SAXParserFactory saxFactory = javax.xml.parsers.SAXParserFactory.newInstance(); javax.xml.parsers.SAXParser parser = saxFactory.newSAXParser(); XMLOutputFactory outFactory = XMLOutputFactory.newInstance(); XMLEventWriter writer = outFactory.createXMLEventWriter(System.out); SAX2StAXEventWriter handler = new SAX2StAXEventWriter(writer); InputStream is = new StringBufferInputStream(XML); parser.parse(is, handler); // if it doesn't blow up, it succeeded. }