/** Parses the given XML string into a list of key/value pairs. */ public static Hashtable<String, String> parseXML(String xml) throws IOException { MetadataHandler handler = new MetadataHandler(); parseXML(xml, handler); return handler.getMetadata(); }
/** * Parses the given XML string into a list of key/value pairs. * * @param xml the {@link InputStream} representing the XML * @return a hashtable of key/value pairs representing the XML * @throws IOException if there is an error during parsing * @see MetadataHandler */ public static Hashtable<String, String> parseXML(String xml) throws IOException { MetadataHandler handler = new MetadataHandler(); parseXML(xml, handler); return handler.getMetadata(); }