axel/src/main/java/fr/xgouchet/xmleditor/core/actions/SaveXmlAction.java
private void writeDocType(final @NonNull XmlDocTypeDeclaration docTypeDecl) throws IOException {
            mWriter.write("<!DOCTYPE ");
            mWriter.write(docTypeDecl.getRootElement());

            // External doctype reference
            if (docTypeDecl instanceof XmlExternalDTD) {
                mWriter.write(" ");
                mWriter.write(docTypeDecl.getDeclarationType());

                if (docTypeDecl instanceof XmlPublicDTD) {
                    mWriter.write(" \"");
                    mWriter.write(((XmlPublicDTD) docTypeDecl).getName());
                    mWriter.write("\"");
                }

                mWriter.write(" \"");
                mWriter.write(((XmlExternalDTD) docTypeDecl).getLocation());
                mWriter.write("\"");
            }

            // Internal definition / override
            String internalDef = docTypeDecl.getInternalDefinition();
            if (internalDef != null) {
                mWriter.write(" [");
                mWriter.write(internalDef);
                mWriter.write("]");
            }

            mWriter.write(">\n");
        }
/**
         * @param docTypeDecl the DTD to write
         * @throws IOException
         */
@param docTypeDecl the DTD to write
@throws IOException
@param docTypeDecl the DTD to write @throws IOException
private void writeDocType(final @NonNull XmlDocTypeDeclaration docTypeDecl) throws IOException {
            mWriter.write("<!DOCTYPE ");
            mWriter.write(docTypeDecl.getRootElement());
            if (docTypeDecl instanceof XmlExternalDTD) {
                mWriter.write(" ");
                mWriter.write(docTypeDecl.getDeclarationType());
                if (docTypeDecl instanceof XmlPublicDTD) {
                    mWriter.write(" \"");
                    mWriter.write(((XmlPublicDTD) docTypeDecl).getName());
                    mWriter.write("\"");
                }
                mWriter.write(" \"");
                mWriter.write(((XmlExternalDTD) docTypeDecl).getLocation());
                mWriter.write("\"");
            }
            String internalDef = docTypeDecl.getInternalDefinition();
            if (internalDef != null) {
                mWriter.write(" [");
                mWriter.write(internalDef);
                mWriter.write("]");
            }
            mWriter.write(">\n");
        }
private void writeDocType ( final @ NonNull XmlDocTypeDeclaration docTypeDecl ) throws IOException { mWriter . write ( "<!DOCTYPE " ) ; mWriter . write ( docTypeDecl . getRootElement ( ) ) ; if ( docTypeDecl instanceof XmlExternalDTD ) { mWriter . write ( " " ) ; mWriter . write ( docTypeDecl . getDeclarationType ( ) ) ; if ( docTypeDecl instanceof XmlPublicDTD ) { mWriter . write ( " \"" ) ; mWriter . write ( ( ( XmlPublicDTD ) docTypeDecl ) . getName ( ) ) ; mWriter . write ( "\"" ) ; } mWriter . write ( " \"" ) ; mWriter . write ( ( ( XmlExternalDTD ) docTypeDecl ) . getLocation ( ) ) ; mWriter . write ( "\"" ) ; } String internalDef = docTypeDecl . getInternalDefinition ( ) ; if ( internalDef != null ) { mWriter . write ( " [" ) ; mWriter . write ( internalDef ) ; mWriter . write ( "]" ) ; } mWriter . write ( ">\n" ) ; }
@param docTypeDecl the DTD to write
 @throws IOException
@param docTypeDecl the DTD to write @throws IOException
// External doctype reference // Internal definition / override