org.xml.sax.InputSource中有publicId 和 systemId
这个public identifier 和 system identifier究竟是个啥玩意儿?
谁跟我讲讲啊?
[code="java"]
/**
* Set the public identifier for this input source.
*
* <p>The public identifier is always optional: if the application
* writer includes one, it will be provided as part of the
* location information.</p>
*
* @param publicId The public identifier as a string.
* @see #getPublicId
* @see org.xml.sax.Locator#getPublicId
* @see org.xml.sax.SAXParseException#getPublicId
*/
public void setPublicId (String publicId)
{
this.publicId = publicId;
}
/**
* Set the system identifier for this input source.
*
* <p>The system identifier is optional if there is a byte stream
* or a character stream, but it is still useful to provide one,
* since the application can use it to resolve relative URIs
* and can include it in error messages and warnings (the parser
* will attempt to open a connection to the URI only if
* there is no byte stream or character stream specified).</p>
*
* <p>If the application knows the character encoding of the
* object pointed to by the system identifier, it can register
* the encoding using the setEncoding method.</p>
*
* <p>If the system identifier is a URL, it must be fully
* resolved (it may not be a relative URL).</p>
*
* @param systemId The system identifier as a string.
* @see #setEncoding
* @see #getSystemId
* @see org.xml.sax.Locator#getSystemId
* @see org.xml.sax.SAXParseException#getSystemId
*/
public void setSystemId (String systemId)
{
this.systemId = systemId;
}
[/code]