|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.XMLConstants
public class XMLConstants
This class contains a set of constants, as specified by various W3C and other standards.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_NS_PREFIX
This constant is used to represent the default namespace. |
static java.lang.String |
XML_NS_PREFIX
Constant holding the reserved "xml" prefix. |
static java.lang.String |
XML_NS_URI
Constant holding the reserved namespace URI associated with the "xml" prefix. |
static java.lang.String |
XMLNS_ATTRIBUTE
Constant holding the attribute name for declaration of new prefixes. |
static java.lang.String |
XMLNS_ATTRIBUTE_NS_URI
Constant holding the namespace of the "xmlns" attribute: "http://www.w3.org/2000/xmlns/". |
Constructor Summary | |
---|---|
XMLConstants()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_NS_PREFIX
This constant is used to represent the default namespace. Elements or attributes in the default namespace are sometimes also referred as "having no namespace". The constant value is "" (the empty string).
Note: The default namespace is used like this
in SAX handlers. Note, that DOM uses null
to represent the default namespace, hence a different
value.
public static final java.lang.String XML_NS_PREFIX
Constant holding the reserved "xml" prefix. This
prefix is reserved by the XML namespace standard. Unlike
other prefixes, this one is fixed and will always be
associated with the same namespace, XML_NS_URI
.
Namespace and prefix are reserved by the XML namespace
standard for use by the XML specifications.
Note: Not only the prefix "xml" itself is reserved, but also any other prefix beginning with "xml". For example, a "new_prefix" may be declared in an XML instance by using the attribute "xmlns:new_prefix".
public static final java.lang.String XML_NS_URI
Constant holding the reserved namespace URI associated with the "xml" prefix. Namespace and prefix are reserved by the XML namespace standard for use by the XML specifications.
public static final java.lang.String XMLNS_ATTRIBUTE
Constant holding the attribute name for declaration of new prefixes. The constant value is "xmlns".
Note: This is both an attribute name and a namespace prefix: For example, to assign the empty prefix to a namespace, one would use
xmlns="http://my.namespace/..."But for assigning the prefix "pre" to the same namespace, one would use
xmlns:pre="http://my.namespace/..."
public static final java.lang.String XMLNS_ATTRIBUTE_NS_URI
Constant holding the namespace of the "xmlns" attribute: "http://www.w3.org/2000/xmlns/".
Note: This namespace will always be used for the
attribute, regardless whether you used it as an attribute name
(as in xmlns="..."
or as an attribute prefix
(as in xmlns:pre="..."
).
Constructor Detail |
---|
public XMLConstants()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |