@Test public void loadDocument() { assertEquals("problems", document.getDocumentElement().getTagName()); }
static @NotNull Document loadDocument(@NotNull InputStream is, boolean validating) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = dbf.newDocumentBuilder(); if (validating) { documentBuilder.setErrorHandler(new XmlErrorHandler()); } dbf.setValidating(validating); return documentBuilder.parse(is); }
XmlUtils { static @NotNull Document loadDocument(@NotNull InputStream is, boolean validating) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = dbf.newDocumentBuilder(); if (validating) { documentBuilder.setErrorHandler(new XmlErrorHandler()); } dbf.setValidating(validating); return documentBuilder.parse(is); } }
XmlUtils { static @NotNull Document loadDocument(@NotNull InputStream is, boolean validating) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = dbf.newDocumentBuilder(); if (validating) { documentBuilder.setErrorHandler(new XmlErrorHandler()); } dbf.setValidating(validating); return documentBuilder.parse(is); } private  XmlUtils(); }
XmlUtils { static @NotNull Document loadDocument(@NotNull InputStream is, boolean validating) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = dbf.newDocumentBuilder(); if (validating) { documentBuilder.setErrorHandler(new XmlErrorHandler()); } dbf.setValidating(validating); return documentBuilder.parse(is); } private  XmlUtils();  }
XmlUtils { static @NotNull Document loadDocument(@NotNull InputStream is, boolean validating) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = dbf.newDocumentBuilder(); if (validating) { documentBuilder.setErrorHandler(new XmlErrorHandler()); } dbf.setValidating(validating); return documentBuilder.parse(is); } private  XmlUtils();   }