Name
Notation
Synopsis
This interface represents a notation declared in the DTD of an XML document. In XML notations are used to specify the format of an unparsed entity or to formally declare a processing instruction target.
The getNodeName( )
method of the
Node
interface returns the name of the notation.
getSystemId( )
and getPublicId(
)
return the system identifier and the public identifier
specified in the notation declaration. The getNotations(
)
method of the DocumentType
interface
returns a NamedNodeMap
of
Notation
objects declared in the DTD and provides
a way to look up Notation
objects by notation
name.
Because notations appear in the DTD and not the document itself,
Notation
nodes are never part of the document
tree, and the getParentNode( )
method always
returns null
. Similarly, since XML notation
declarations never have any content, a Notation
node never has children and getChildNodes( )
always returns null
. Notation objects are
read-only and cannot be modified in any way.
Figure 21-12. org.w3c.dom.Notation
public interface Notation extends Node { // Public Instance Methods String getPublicId( ); String getSystemId( ); }
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.