Public Member Functions | |
String | getPrefix () |
String | getURI () |
boolean | equals (Object ob) |
String | toString () |
int | hashCode () |
Static Public Member Functions | |
static Namespace | getNamespace (String prefix, String uri) |
static Namespace | getNamespace (String uri) |
Static Public Attributes | |
static final Namespace | NO_NAMESPACE = new Namespace("", "") |
static final Namespace | XML_NAMESPACE |
Static Package Functions | |
[static initializer] |
Namespace
defines both a factory for creating XML namespaces, and a namespace itself. This class represents an XML namespace in Java.
Elements and Attributes containing Namespaces can be serialized; however the Namespace class itself does not implement java.io.Serializable
. This works because the Element and Attribute classes handle serialization of their Namespaces manually. The classes use the getNamespace() method on deserialization to ensure there may be only one unique Namespace object for any unique prefix/uri pair, something needed for efficiency reasons.
org::jdom::Namespace::[static initializer] | ( | ) | [inline, static, package] |
This static initializer acts as a factory contructor. It sets up storage and required initial values.
static Namespace org::jdom::Namespace::getNamespace | ( | String | prefix, | |
String | uri | |||
) | [inline, static] |
This will retrieve (if in existence) or create (if not) a Namespace
for the supplied prefix and URI.
Namespace
- ready to use namespace. IllegalNameException | if the given prefix and uri make up an illegal namespace name. |
static Namespace org::jdom::Namespace::getNamespace | ( | String | uri | ) | [inline, static] |
String org::jdom::Namespace::getPrefix | ( | ) | [inline] |
String org::jdom::Namespace::getURI | ( | ) | [inline] |
boolean org::jdom::Namespace::equals | ( | Object | ob | ) | [inline] |
String org::jdom::Namespace::toString | ( | ) | [inline] |
This returns a String
representation of this Namespace
, suitable for use in debugging.
String
- information about this instance. int org::jdom::Namespace::hashCode | ( | ) | [inline] |
final Namespace org::jdom::Namespace::NO_NAMESPACE = new Namespace("", "") [static] |
Define a Namespace
for when not in a namespace
final Namespace org::jdom::Namespace::XML_NAMESPACE [static] |
Initial value:
new Namespace("xml", "http://www.w3.org/XML/1998/namespace")