src/main/java/org/dom4j/io/XPPPacketReader.java
public Document read(String systemID) throws DocumentException,
            IOException, XmlPullParserException {
        if (systemID.indexOf(':') >= 0) {
            // lets assume its a URL
            return read(new URL(systemID));
        } else {
            // lets assume that we are given a file name
            return read(new File(systemID));
        }
    }
public Document read(String systemID) throws DocumentException,
            IOException, XmlPullParserException {
        if (systemID.indexOf(':') >= 0) {
            // lets assume its a URL
            return read(new URL(systemID));
        } else {
            // lets assume that we are given a file name
            return read(new File(systemID));
        }
    }
<p>
Reads a Document from the given URL or filename.
</p>
<p/>
<p/>
If the systemID contains a <code>':'</code> character then it is assumed
to be a URL otherwise its assumed to be a file name. If you want finer
grained control over this mechansim then please explicitly pass in either
a {@link URL} or a {@link File} instance instead of a {@link String} to
denote the source of the document.
</p>

@param systemID
is a URL for a document or a file name.
@return the newly created Document instance
@throws DocumentException
if an error occurs during parsing.
@throws java.net.MalformedURLException
if a URL could not be made for the given File