_printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' );
/** * Serializes a namespace attribute with the given prefix and value for URI. * In case prefix is empty will serialize default namespace declaration. * * @param prefix * @param uri * @exception IOException */ private void printNamespaceAttr(String prefix, String uri) throws IOException{ _printer.printSpace(); if (prefix == XMLSymbols.EMPTY_STRING) { if (DEBUG) { System.out.println("=>add xmlns=\""+uri+"\" declaration"); } _printer.printText( XMLSymbols.PREFIX_XMLNS ); } else { if (DEBUG) { System.out.println("=>add xmlns:"+prefix+"=\""+uri+"\" declaration"); } _printer.printText( "xmlns:"+prefix ); } _printer.printText( "=\"" ); printEscaped( uri ); _printer.printText( '"' ); }
_printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); if (name.length() == 0) { _printer.printText( "xmlns=\"" ); printEscaped( value ); _printer.printText( '"' ); _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' );