Code example for LSOutput

Methods: setCharacterStream

        DOMImplementation domImpl = node.getOwnerDocument().getImplementation();
        DOMImplementationLS domImplLS = (DOMImplementationLS) domImpl.getFeature("LS", "3.0");
        LSSerializer serializer = domImplLS.createLSSerializer();
        LSOutput serializerOut = domImplLS.createLSOutput();
        serializer.write(node, serializerOut);
     * Converts a QName into a string that can be used for attribute values or element content. 
     * @param qname the QName to convert to a string 
     * @return the string value of the QName 
    public static String qnameToContentString(QName qname) {
        StringBuffer buf = new StringBuffer();
Contextual code suggestions in your IDE  Get Codota for Java