Object
This class is used to attach arbitrary information to an XML document. It also defines several well-known types of information that can be attached or found on a document.
For example, suppose you wanted to associate a filename with the document containing an xml object "xobj". This could be done via the following code:
tokenSource.documentProperties().set(XmlDocumentProperties.NAME, "MyFilename.xml");
To fetch the filename later, given an xobj2 anywhere in the same document, you can write:
filename = (String)tokenSource.documentProperties().get(XmlDocumentProperties.NAME);
Object
XmlDocumentProperties
Field Summary |
public static final |
|
public static final |
|
public static final |
|
public static final |
|
public static final |
|
public static final |
|
public static final |
|
Constructor Summary |
Method Summary |
public abstract | |
public |
|
public |
|
public |
|
public |
|
public byte[] |
|
public |
|
public |
|
public abstract | |
public abstract | |
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object
DOCTYPE_NAME
public static final Object
DOCTYPE_PUBLIC_ID
public static final Object
DOCTYPE_SYSTEM_ID
public static final Object
ENCODING
public static final Object
MESSAGE_DIGEST
public static final Object
SOURCE_NAME
public static final Object
VERSION
Constructor Detail |
public XmlDocumentProperties()
Method Detail |
public abstractReturns a value previously attached to a document using set.Object
get(Object
key)
public String
getDoctypeName()
Returns the DOCTYPE name used in the <!DOCTYPE> declaration.
public String
getDoctypePublicId()
Returns the DOCTYPE public ID used in the <!DOCTYPE> declaration.
public String
getDoctypeSystemId()
Returns the DOCTYPE system ID used in the <!DOCTYPE> declaration.
public String
getEncoding()
Returns the encoding used for the XML document, as an ISO encoding name.
Related Topics
XmlOptions.setCharacterEncoding(String)
public byte[] getMessageDigest()Returns the message digest used to summarize the document.
Related Topics
XmlOptions.setLoadMessageDigest()
public String
getSourceName()
Returns the name of the XML document file. Typically a URL, but may
be any String.
Related Topics
XmlOptions.setDocumentSourceName(String)
public String
getVersion()
Returns the XML version string used in the <?xml?> declaration.
public abstractAttaches a value to the root of the document containing the given token source.Object
put(Object
key,Object
value)
public abstractRemoves a value previously attached to a document using set.Object
remove(Object
key)
public void setDoctypeName(String
doctypename)
Sets the DOCTYPE name use in the <!DOCTYPE> declaration.
public void setDoctypePublicId(String
publicid)
Sets the DOCTYPE public ID to use in the <!DOCTYPE> declaration.
public void setDoctypeSystemId(String
systemid)
Sets the DOCTYPE system ID to use in the <!DOCTYPE> declaration.
public void setEncoding(String
encoding)
Sets the encoding to use for the XML document. Should be a valid
XML encoding string.
Related Topics
XmlOptions.setCharacterEncoding(String)
public void setMessageDigest(byte[] digest)Sets the message digest used to summarize the document.
Related Topics
XmlOptions.setLoadMessageDigest()
public void setSourceName(String
sourceName)
Sets the name of the XML document file. Typically a URL, but may
be any String.
Related Topics
XmlOptions.setDocumentSourceName(String)
public void setVersion(String
version)
Sets the XML version string to use in the <?xml?> declaration.
(The XML specification is quite stable at "1.0".)