Code example for DocumentType

Methods: getSystemId

0
           doctype = doc.getDoctype();
           if ( doctype != null ) {
           // Note on catch: DOM Level 1 does not specify this method 
           // and the code will throw a NoSuchMethodError 
           try { 
           return doctype.getSystemId();
           } catch ( Error except ) { }
           } 
         
        if ( doc instanceof HTMLDocument )
            return DTD.XHTMLSystemId;
        return null; 
    } 
 
 
    /** 
     * Returns the suitable media format for a document 
     * output with the specified method. 
     */ 
    public static String whichMediaType( String method )
    {