Package org.jdom2.located
Class LocatedElement
java.lang.Object
org.jdom2.Content
org.jdom2.Element
org.jdom2.located.LocatedElement
- All Implemented Interfaces:
Serializable
,Cloneable
,Located
,NamespaceAware
,Parent
This Element specialization contains the location information as parsed.
- Author:
- Rolf Lear
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdom2.Content
Content.CType
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLocatedElement
(String name) Create a new element with the supplied (local) name and no namespace.LocatedElement
(String name, String uri) Creates a new element with the supplied (local) name and a namespace given by a URI.LocatedElement
(String name, String prefix, String uri) Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination.LocatedElement
(String name, Namespace namespace) Creates a new element with the supplied (local) name and namespace. -
Method Summary
Methods inherited from class org.jdom2.Element
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, canContainContent, clone, cloneContent, coalesceText, detach, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributesSize, 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, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, getXMLBaseURI, hasAdditionalNamespaces, hasAttributes, 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, sortAttributes, sortChildren, sortContent, sortContent, toString
Methods inherited from class org.jdom2.Content
equals, getCType, getDocument, getParent, getParentElement, hashCode, setParent
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jdom2.Parent
getDocument, getParent
-
Constructor Details
-
LocatedElement
Creates a new element with the supplied (local) name and namespace. If the provided namespace is null, the element will have no namespace.- Parameters:
name
- local name of the elementnamespace
- namespace for the element- Throws:
IllegalNameException
- if the given name is illegal as an element name
-
LocatedElement
Create a new element with the supplied (local) name and no namespace.- Parameters:
name
- local name of the element- Throws:
IllegalNameException
- if the given name is illegal as an element name.
-
LocatedElement
Creates a new element with the supplied (local) name and a namespace given by a URI. The element will be put into the unprefixed (default) namespace.- Parameters:
name
- name of the elementuri
- namespace URI for the element- Throws:
IllegalNameException
- if the given name is illegal as an element name or the given URI is illegal as a namespace URI
-
LocatedElement
Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination.- Parameters:
name
- local name of the elementprefix
- namespace prefixuri
- namespace URI for the element- Throws:
IllegalNameException
- if the given name is illegal as an element name, the given prefix is illegal as a namespace prefix, or the given URI is illegal as a namespace URI
-
-
Method Details
-
getLine
public int getLine()Description copied from interface:Located
Get the line number -
getColumn
public int getColumn()Description copied from interface:Located
Get the column (character on the line). -
setLine
public void setLine(int line) Description copied from interface:Located
Set the line number -
setColumn
public void setColumn(int col) Description copied from interface:Located
Set the column (character on the line).
-