This method of the Document class retrieves the external identifier.
public final String getId();
Returns the external identifier specified in the <!DOCTYPE> tag or null if no <!DOCTYPE> tag was specified.