public static Document parseXml(final InputStream is) throws Exception {
        return parseXml(is, null);
    }
@Test
    public void testParse() throws Exception {
        InputStream fis = Files.newInputStream(Paths.get("src/test/resources/org/apache/camel/util/camel-context.xml"));
        Document dom = XmlLineNumberParser.parseXml(fis);
        assertNotNull(dom);

        NodeList list = dom.getElementsByTagName("beans");
        assertEquals(1, list.getLength());
        Node node = list.item(0);

        String lineNumber = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER);
        String lineNumberEnd = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER_END);

        assertEquals("24", lineNumber);
        assertEquals("49", lineNumberEnd);
    }