77 String in = getClass().getResource("Bug4693341.xml").getPath();
78 File file = new File(in);
79 StreamSource source = new StreamSource(new FileInputStream(file), ("file://" + in));
80
81 transformer.transform(source, result);
82
83 //URL inputsource = new URL("file", "", golden);
84 URL output = new URL("file", "", outf.getPath());
85
86 // error happens when trying to parse output
87 String systemId = output.toExternalForm();
88 System.out.println("systemId: " + systemId);
89 InputSource is = new InputSource(systemId);
90 SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
91 parser.parse(is, new DefaultHandler());
92 } catch (Exception ex) {
93 Assert.fail(ex.getMessage());
94 }
95 }
96 }
97
|
77 String in = getClass().getResource("Bug4693341.xml").getPath();
78 File file = new File(in);
79 StreamSource source = new StreamSource(new FileInputStream(file), ("file://" + in));
80
81 transformer.transform(source, result);
82
83 //URL inputsource = new URL("file", "", golden);
84 URL output = new URL("file", "", outf.getPath());
85
86 // error happens when trying to parse output
87 String systemId = output.toExternalForm();
88 System.out.println("systemId: " + systemId);
89 InputSource is = new InputSource(systemId);
90 SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
91 parser.parse(is, new DefaultHandler());
92 } catch (Exception ex) {
93 Assert.fail(ex.getMessage());
94 }
95 }
96 }
|