org.jaxen.jdom

Class XPathNamespace


public class XPathNamespace
extends java.lang.Object

Wrapper for JDOM namespace nodes to give them a parent, as required by the XPath data model.
Author:
Erwin Bolwidt

Field Summary

private Element
jdomElement
private Namespace
jdomNamespace

Constructor Summary

XPathNamespace(Element jdomElement, Namespace jdomNamespace)
Creates a namespace-node wrapper for a namespace node that is assigned to the given JDOM element.
XPathNamespace(Namespace jdomNamespace)
Creates a namespace-node wrapper for a namespace node that hasn't been assigned to an element yet.

Method Summary

Element
getJDOMElement()
Returns the JDOM element from which this namespace node has been retrieved.
Namespace
getJDOMNamespace()
Returns the JDOM namespace object of this namespace node; the JDOM namespace object contains the prefix and URI of the namespace.
void
setJDOMElement(Element jdomElement)
Sets or changes the element to which this namespace node is assigned.
String
toString()

Field Details

jdomElement

private Element jdomElement

jdomNamespace

private Namespace jdomNamespace

Constructor Details

XPathNamespace

public XPathNamespace(Element jdomElement,
                      Namespace jdomNamespace)
Creates a namespace-node wrapper for a namespace node that is assigned to the given JDOM element.

XPathNamespace

public XPathNamespace(Namespace jdomNamespace)
Creates a namespace-node wrapper for a namespace node that hasn't been assigned to an element yet.

Method Details

getJDOMElement

public Element getJDOMElement()
Returns the JDOM element from which this namespace node has been retrieved. The result may be null when the namespace node has not yet been assigned to an element.

getJDOMNamespace

public Namespace getJDOMNamespace()
Returns the JDOM namespace object of this namespace node; the JDOM namespace object contains the prefix and URI of the namespace.

setJDOMElement

public void setJDOMElement(Element jdomElement)
Sets or changes the element to which this namespace node is assigned.

toString

public String toString()