use of org.eclipse.wst.xml.xpath2.processor.DOMLoaderException in project webtools.sourceediting by eclipse.
the class AbstractPsychoPathWTPTest method loadDOMDocument.
protected void loadDOMDocument(URL fileURL, Schema schema) throws IOException, DOMLoaderException {
InputStream is = testResolve(fileURL);
DOMLoader domloader = new XercesLoader(schema);
domloader.set_validating(false);
domDoc = domloader.load(is);
domDoc.setDocumentURI(fileURL.toString());
}
use of org.eclipse.wst.xml.xpath2.processor.DOMLoaderException in project webtools.sourceediting by eclipse.
the class AbstractPsychoPathWTPTest 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 loadDOMDocument.
protected void loadDOMDocument(URL fileURL, Schema schema) throws IOException, DOMLoaderException {
InputStream is = testResolve(fileURL);
DOMLoader domloader = new XercesLoader(schema);
domloader.set_validating(false);
domDoc = domloader.load(is);
domDoc.setDocumentURI(fileURL.toString());
}
use of org.eclipse.wst.xml.xpath2.processor.DOMLoaderException in project webtools.sourceediting by eclipse.
the class AbstractPsychoPathTest method loadDOMDocument.
protected void loadDOMDocument(URL fileURL, URL schemaURL) throws IOException, DOMLoaderException, SAXException {
InputStream is = testResolve(fileURL);
InputStream schemaIs = testResolve(schemaURL);
Schema jaxpSchema = getSchema(schemaIs);
DOMLoader domloader = new XercesLoader(jaxpSchema);
domloader.set_validating(false);
domDoc = domloader.load(is);
}
use of org.eclipse.wst.xml.xpath2.processor.DOMLoaderException in project webtools.sourceediting by eclipse.
the class AbstractPsychoPathWTPTest method loadDOMDocument.
protected void loadDOMDocument(URL fileURL) throws IOException, DOMLoaderException {
InputStream is = testResolve(fileURL);
DOMLoader domloader = new XercesLoader();
domloader.set_validating(false);
domDoc = domloader.load(is);
domDoc.setDocumentURI(fileURL.toString());
}
Aggregations