List of usage examples for org.w3c.dom.ls DOMImplementationLS createLSParser
public LSParser createLSParser(short mode, String schemaType) throws DOMException;
LSParser
. From source file:org.xwiki.platform.patchservice.web.PatchServiceAction.java
private Document parseString(String content) { try {// w ww .j a va 2s . c o m DOMImplementationLS lsImpl = (DOMImplementationLS) DOMImplementationRegistry.newInstance() .getDOMImplementation("LS 3.0"); LSInput input = lsImpl.createLSInput(); input.setCharacterStream(new StringReader(content)); LSParser p = lsImpl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); return p.parse(input); } catch (Exception ex) { return null; } }