@Test public void readFromStringWithXmlHeader() throws Exception { final String xml = "<?xml version=\"1.0\"?>\n" + "<dublincore xmlns=\"http: + " xmlns:xsi=\"http: + " xmlns:dcterms=\"http: + " <dcterms:title>Land and Vegetation: Key players on the Climate Scene</dcterms:title>\n" + " <dcterms:subject>climate, land, vegetation</dcterms:subject>\n" + "</dublincore>"; assertEquals( "Land and Vegetation: Key players on the Climate Scene", DublinCoreXmlFormat.read(xml).getFirst(DublinCore.PROPERTY_TITLE)); }
@Nonnull public static DublinCoreCatalog read(InputStream xml) throws IOException, SAXException, ParserConfigurationException { return new DublinCoreXmlFormat().readImpl(new InputSource(xml)); }
DublinCoreXmlFormat extends DefaultHandler { @Nonnull public static DublinCoreCatalog read(InputStream xml) throws IOException, SAXException, ParserConfigurationException { return new DublinCoreXmlFormat().readImpl(new InputSource(xml)); } }
DublinCoreXmlFormat extends DefaultHandler { @Nonnull public static DublinCoreCatalog read(InputStream xml) throws IOException, SAXException, ParserConfigurationException { return new DublinCoreXmlFormat().readImpl(new InputSource(xml)); } private  DublinCoreXmlFormat(); private  DublinCoreXmlFormat(boolean includeEmpty); }
DublinCoreXmlFormat extends DefaultHandler { @Nonnull public static DublinCoreCatalog read(InputStream xml) throws IOException, SAXException, ParserConfigurationException { return new DublinCoreXmlFormat().readImpl(new InputSource(xml)); } private  DublinCoreXmlFormat(); private  DublinCoreXmlFormat(boolean includeEmpty); @Nonnull static DublinCoreCatalog read(InputStream xml); @Nonnull static DublinCoreCatalog read(File xml); @Nonnull static DublinCoreCatalog read(String xml); static Opt<DublinCoreCatalog> readOpt(String xml); @Nonnull static DublinCoreCatalog read(Node xml); @Nonnull static DublinCoreCatalog read(File xml, boolean includeEmptiedElements); static DublinCoreCatalog merge(DublinCoreCatalog fromCatalog, DublinCoreCatalog intoCatalog); static Document writeDocument(DublinCoreCatalog dc); @Override void characters(char[] ch, int start, int length); @Override void startPrefixMapping(String prefix, String uri); @Override void startElement(String uri, String localName, String name, Attributes attributes); @Override void endElement(String uri, String localName, String name); @Override void error(SAXParseException e); @Override void fatalError(SAXParseException e); @Override void warning(SAXParseException e); }
DublinCoreXmlFormat extends DefaultHandler { @Nonnull public static DublinCoreCatalog read(InputStream xml) throws IOException, SAXException, ParserConfigurationException { return new DublinCoreXmlFormat().readImpl(new InputSource(xml)); } private  DublinCoreXmlFormat(); private  DublinCoreXmlFormat(boolean includeEmpty); @Nonnull static DublinCoreCatalog read(InputStream xml); @Nonnull static DublinCoreCatalog read(File xml); @Nonnull static DublinCoreCatalog read(String xml); static Opt<DublinCoreCatalog> readOpt(String xml); @Nonnull static DublinCoreCatalog read(Node xml); @Nonnull static DublinCoreCatalog read(File xml, boolean includeEmptiedElements); static DublinCoreCatalog merge(DublinCoreCatalog fromCatalog, DublinCoreCatalog intoCatalog); static Document writeDocument(DublinCoreCatalog dc); @Override void characters(char[] ch, int start, int length); @Override void startPrefixMapping(String prefix, String uri); @Override void startElement(String uri, String localName, String name, Attributes attributes); @Override void endElement(String uri, String localName, String name); @Override void error(SAXParseException e); @Override void fatalError(SAXParseException e); @Override void warning(SAXParseException e);  }