/** * Bind from the XML into the Java Object model. * @param inputSource The XML input. * @param toType The Java type to which the XML data is to be bound. * @param <T> The Java type to which the XML data is to be bound. * @return The populated Java instance. */ public <T> T fromXML(String inputSource, Class<T> toType) { try { return bind(new StringSource(inputSource), toType); } catch (IOException e) { throw new IllegalStateException("Unexpected IOException from a String input.", e); } }
/** * Bind from the XML into the Java Object model. * @param inputSource The XML input. * @param toType The Java type to which the XML data is to be bound. * @param <T> The Java type to which the XML data is to be bound. * @return The populated Java instance. */ public <T> T fromXML(String inputSource, Class<T> toType) { try { return bind(new StringSource(inputSource), toType); } catch (IOException e) { throw new IllegalStateException("Unexpected IOException from a String input.", e); } }
/** * Bind from the XML into the Java Object model. * @param inputSource The XML input. * @param toType The Java type to which the XML data is to be bound. * @param <T> The Java type to which the XML data is to be bound. * @return The populated Java instance. */ public <T> T fromXML(String inputSource, Class<T> toType) { try { return bind(new StringSource(inputSource), toType); } catch (IOException e) { throw new IllegalStateException("Unexpected IOException from a String input.", e); } }
protected void doFilter(Source source, Result result) { if(source instanceof DOMSource) { String serializedDOM = XmlUtil.serialize(((DOMSource)source).getNode(), false); source = new StringSource(serializedDOM); if(logger.isDebugEnabled()) { logger.debug("DOMSource converted to a StringSource.");
protected void doFilter(Source source, Result result) { if(source instanceof DOMSource) { String serializedDOM = XmlUtil.serialize(((DOMSource)source).getNode(), false); source = new StringSource(serializedDOM); if(logger.isDebugEnabled()) { logger.debug("DOMSource converted to a StringSource.");
protected void doFilter(Source source, Result result) { if(source instanceof DOMSource) { String serializedDOM = XmlUtil.serialize(((DOMSource)source).getNode(), false); source = new StringSource(serializedDOM); if(logger.isDebugEnabled()) { logger.debug("DOMSource converted to a StringSource.");
protected void doFilter(Source source, Result result) { if(source instanceof DOMSource) { String serializedDOM = XmlUtil.serialize(((DOMSource)source).getNode(), false); source = new StringSource(serializedDOM); if(logger.isDebugEnabled()) { logger.debug("DOMSource converted to a StringSource.");