use of org.eclipse.wst.xml.xpath2.processor.DOMLoaderException in project webtools.sourceediting by eclipse.
the class AbstractPsychoPathWTPTest method load2DOMDocument.
protected void load2DOMDocument(URL fileURL, URL fileURL2) throws IOException, DOMLoaderException {
InputStream is = testResolve(fileURL);
InputStream is2 = testResolve(fileURL2);
DOMLoader domloader = new XercesLoader();
domloader.set_validating(false);
domDoc = domloader.load(is);
domDoc.setDocumentURI(fileURL.toString());
domDoc2 = domloader.load(is2);
domDoc2.setDocumentURI(fileURL2.toString());
is.close();
is2.close();
}
use of org.eclipse.wst.xml.xpath2.processor.DOMLoaderException in project webtools.sourceediting by eclipse.
the class AbstractPsychoPathTest method resolveCharacterReferences.
protected String resolveCharacterReferences(String xpath) {
String docText = "<doc>" + xpath + "</doc>";
InputStream is;
try {
is = new ByteArrayInputStream(docText.getBytes("UTF-8"));
DOMLoader domloader = new XercesLoader();
domloader.set_validating(false);
Document temp = domloader.load(is);
return temp.getDocumentElement().getFirstChild().getTextContent();
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
} catch (DOMLoaderException e) {
throw new RuntimeException(e);
}
}
use of org.eclipse.wst.xml.xpath2.processor.DOMLoaderException in project webtools.sourceediting by eclipse.
the class AbstractPsychoPathTest method load2DOMDocument.
protected void load2DOMDocument(URL fileURL, URL fileURL2) throws IOException, DOMLoaderException {
InputStream is = testResolve(fileURL);
InputStream is2 = testResolve(fileURL2);
DOMLoader domloader = new XercesLoader();
domloader.set_validating(false);
domDoc = domloader.load(is);
domDoc.setDocumentURI(fileURL.toString());
domDoc2 = domloader.load(is2);
domDoc2.setDocumentURI(fileURL2.toString());
is.close();
is2.close();
}
Aggregations