/** * Constructor * @param fileName * @param dpb * @throws NamespaceException */ public NamespaceExtractor(String fileName, String dpb) throws NamespaceException { defaultBasePrefix = dpb; try{ ContentHandler handler = new NamespaceExtractor.NamespaceHandler(); XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(handler); parser.parse(new InputSource(new FileInputStream(fileName))); } catch(Exception e){ throw new NamespaceException(); } }
/** * Constructor * @param fileName * @param dpb * @throws NamespaceException */ public NamespaceExtractor(String fileName, String dpb) throws NamespaceException { defaultBasePrefix = dpb; try{ ContentHandler handler = new NamespaceExtractor.NamespaceHandler(); XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(handler); parser.parse(new InputSource(new FileInputStream(fileName))); } catch(Exception e){ throw new NamespaceException(); } }
/** * Constructor * @param fileName * @param dpb * @throws NamespaceException */ public NamespaceExtractor(String fileName, String dpb) throws NamespaceException { defaultBasePrefix = dpb; try{ ContentHandler handler = new NamespaceExtractor.NamespaceHandler(); XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(handler); parser.parse(new InputSource(new FileInputStream(fileName))); } catch(Exception e){ throw new NamespaceException(); } }