dk.brics.misc
Class XElement
java.lang.Object
org.jdom.Content
org.jdom.Element
dk.brics.misc.XElement
- All Implemented Interfaces:
- Serializable, Cloneable, Parent
public class XElement
- extends Element
Element extended with origin information.
- See Also:
- Serialized Form
Methods inherited from class org.jdom.Element |
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText, toString |
XElement
public XElement(String name,
Namespace namespace,
Element origin)
- Constructs a new
XElement
.
- Parameters:
name
- local namenamespace
- namespaceorigin
- get origin from this element
XElement
public XElement(String name,
Namespace namespace,
Origin origin)
- Constructs a new
XElement
.
- Parameters:
name
- local namenamespace
- namespaceorigin
- (null if not applicable)
getOrigin
public Origin getOrigin()
- Returns origin.
- Returns:
- origin (null if not applicable)
getOrigin
public static Origin getOrigin(Element e)
- Returns origin of the given element, if present.
An element may contain an attribute named
origin
from the namespace
http://www.brics.dk/xml/origin
with a value of the form
file:line:column
for specifying the origin of
the element. If absent, the input URL is used as origin file.
- Parameters:
e
- element
- Returns:
- origin, null if not available
setOrigin
public void setOrigin(Origin origin)
- Sets the origin.
- Parameters:
origin
- origin
Copyright © 2005-2010 Anders Møller.