Package org.zanata.xml

Examples of org.zanata.xml.TmxDtdResolver


            session.setFlushMode(FlushMode.MANUAL);
            session.setCacheMode(CacheMode.IGNORE);
            XMLInputFactory factory = XMLInputFactory.newInstance();
            factory.setProperty(XMLInputFactory.SUPPORT_DTD, true);
            factory.setProperty(XMLInputFactory.IS_VALIDATING, true);
            factory.setXMLResolver(new TmxDtdResolver());
            @Cleanup
            XMLStreamReader reader = factory.createXMLStreamReader(input);

            QName tmx = new QName("tmx");
            QName header = new QName("header");
View Full Code Here


        output.write(writerOutputStream);
        writerOutputStream.close();
        String xml = sbWriter.toString();
        assertValidTMX(xml);
        DocumentBuilder controlParser = XMLUnit.newControlParser();
        controlParser.setEntityResolver(new TmxDtdResolver());
        Document doc =
                XMLUnit.buildDocument(controlParser, new StringReader(xml));
        return doc;
    }
View Full Code Here

TOP

Related Classes of org.zanata.xml.TmxDtdResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.