/** * @param xml the xml to parse * @param encoding the encoding of your xml * @param instigator your fully created parser of the xml * @throws UnsupportedEncodingException if the encoding you passed isn't suppored */ public static void parse(String xml, String encoding, Instigator instigator) throws UnsupportedEncodingException { parse(new ByteArrayInputStream(xml.getBytes(encoding)), instigator, getDefaultSEXPXMLReader()); }
/** * @param xml the xml to parse * @param encoding the encoding of your xml * @param streamer your fully created streamer of the xml * @param <T> the expected type of your parsed XML * @return your parsed XML as an object * @throws UnsupportedEncodingException if the encoding you passed isn't suppored */ public static <T> T parse(String xml, String encoding, Streamer<T> streamer) throws UnsupportedEncodingException { return parse(new ByteArrayInputStream(xml.getBytes(encoding)), streamer, getDefaultSEXPXMLReader()); }
/** * @param xml the xml to parse * @param instigator your fully created parser of the xml */ public static void parse(InputStream xml, Instigator instigator) { parse(xml, instigator, getDefaultSEXPXMLReader()); }
/** * @param xml the xml to parse * @param streamer your fully created streamer of the xml * @param <T> the expected type of your parsed XML * @return your parsed XML as an object */ public static <T> T parse(InputStream xml, Streamer<T> streamer) { return parse(xml, streamer, getDefaultSEXPXMLReader()); }
/** * @param xml the xml to parse * @param instigator your fully created parser of the xml */ public static void parse(String xml, Instigator instigator) { parse(new ByteArrayInputStream(xml.getBytes()), instigator, getDefaultSEXPXMLReader()); }
/** * @param xml the xml to parse * @param streamer your fully created streamer of the xml * @param <T> the expected type of your parsed XML * @return your parsed XML as an object */ public static <T> T parse(String xml, Streamer<T> streamer) { return parse(new ByteArrayInputStream(xml.getBytes()), streamer, getDefaultSEXPXMLReader()); }