程序包 | 说明 |
---|---|
org.jdom2 | |
org.jdom2.filter | |
org.jdom2.input.stax |
Support classes for building JDOM documents and content using StAX readers.
|
org.jdom2.located | |
org.jdom2.util | |
org.jdom2.xpath | |
org.jdom2.xpath.jaxen | |
org.jdom2.xpath.util |
限定符和类型 | 字段和说明 |
---|---|
static Namespace |
Namespace.NO_NAMESPACE
Define a
Namespace for when not in a namespace |
static Namespace |
Namespace.XML_NAMESPACE
Define a
Namespace for the standard xml prefix. |
限定符和类型 | 方法和说明 |
---|---|
Namespace |
Element.getNamespace()
Returns the element's
Namespace . |
Namespace |
Attribute.getNamespace()
This will return this
Attribute 's
. |
static Namespace |
Namespace.getNamespace(java.lang.String uri)
This will retrieve (if in existence) or create (if not) a
Namespace for the supplied URI, and make it usable
as a default namespace, as no prefix is supplied. |
Namespace |
Element.getNamespace(java.lang.String prefix)
Returns the
Namespace corresponding to the given prefix in scope
for this element. |
static Namespace |
Namespace.getNamespace(java.lang.String prefix,
java.lang.String uri)
This will retrieve (if in existence) or create (if not) a
Namespace for the supplied prefix and uri. |
限定符和类型 | 方法和说明 |
---|---|
java.util.List<Namespace> |
Element.getAdditionalNamespaces()
Returns a list of the additional namespace declarations on this element.
|
java.util.List<Namespace> |
NamespaceAware.getNamespacesInherited()
Obtain a list of all namespaces that are in scope for this content, but
were not introduced by this content.
|
java.util.List<Namespace> |
Element.getNamespacesInherited() |
java.util.List<Namespace> |
Document.getNamespacesInherited() |
java.util.List<Namespace> |
Content.getNamespacesInherited() |
java.util.List<Namespace> |
Attribute.getNamespacesInherited() |
java.util.List<Namespace> |
NamespaceAware.getNamespacesInScope()
Obtain a list of all namespaces that are in scope for the current
content.
|
java.util.List<Namespace> |
Element.getNamespacesInScope()
Get the Namespaces that are in-scope on this Element.
|
java.util.List<Namespace> |
Document.getNamespacesInScope()
Get the Namespaces that are in-scope on this Document.
|
java.util.List<Namespace> |
Content.getNamespacesInScope() |
java.util.List<Namespace> |
Attribute.getNamespacesInScope()
Get the namespaces that are in-scope on this Attribute.
|
java.util.List<Namespace> |
NamespaceAware.getNamespacesIntroduced()
Obtain a list of all namespaces that are introduced to the XML tree by
this node.
|
java.util.List<Namespace> |
Element.getNamespacesIntroduced() |
java.util.List<Namespace> |
Document.getNamespacesIntroduced() |
java.util.List<Namespace> |
Content.getNamespacesIntroduced() |
java.util.List<Namespace> |
Attribute.getNamespacesIntroduced() |
限定符和类型 | 方法和说明 |
---|---|
void |
UncheckedJDOMFactory.addNamespaceDeclaration(Element parent,
Namespace additional) |
void |
JDOMFactory.addNamespaceDeclaration(Element element,
Namespace additional)
Adds a namespace declaration to an Element
|
void |
DefaultJDOMFactory.addNamespaceDeclaration(Element parent,
Namespace additional) |
boolean |
Element.addNamespaceDeclaration(Namespace additionalNamespace)
Adds a namespace declarations to this element.
|
Attribute |
UncheckedJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
Attribute |
SlimJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
Attribute |
JDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace)
This will create a new
Attribute with the
specified (local) name, value, and type, and in the provided
. |
Attribute |
DefaultJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
Attribute |
UncheckedJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace)
已过时。
|
Attribute |
SlimJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace)
已过时。
|
Attribute |
JDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace)
|
Attribute |
DefaultJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace)
已过时。
|
Attribute |
UncheckedJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
Attribute |
SlimJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
Attribute |
JDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace)
This will create a new
Attribute with the
specified (local) name and value, and in the provided
. |
Attribute |
DefaultJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Attribute attribute)
|
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Element element)
|
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Element element,
int ignoreatt)
|
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
java.util.List<?> list)
Check if a
collides with any namespace
from a list of objects. |
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
java.util.List<?> list,
int ignoreatt)
Check if a
collides with any namespace
from a list of objects. |
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Namespace other)
Check if two namespaces collide.
|
Element |
UncheckedJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
Element |
SlimJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
Element |
JDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace)
This will create a new
Element
with the supplied (local) name, and define
the to be used. |
Element |
DefaultJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
Element |
JDOMFactory.element(java.lang.String name,
Namespace namespace)
This will create a new
Element
with the supplied (local) name, and define
the to be used. |
Element |
DefaultJDOMFactory.element(java.lang.String name,
Namespace namespace) |
Attribute |
Element.getAttribute(java.lang.String attname,
Namespace ns)
This returns the attribute for this element with the given name
and within the given Namespace, or null if no such attribute exists.
|
java.lang.String |
Element.getAttributeValue(java.lang.String attname,
Namespace ns)
This returns the attribute value for the attribute with the given name
and within the given Namespace, null if there is no such attribute, and
the empty string if the attribute value is empty.
|
java.lang.String |
Element.getAttributeValue(java.lang.String attname,
Namespace ns,
java.lang.String def)
This returns the attribute value for the attribute with the given name
and within the given Namespace, or the passed-in default if there is no
such attribute.
|
Element |
Element.getChild(java.lang.String cname,
Namespace ns)
This returns the first child element within this element with the
given local name and belonging to the given namespace.
|
java.util.List<Element> |
Element.getChildren(java.lang.String cname,
Namespace ns)
This returns a List of all the child elements
nested directly (one level deep) within this element with the given
local name and belonging to the given Namespace, returned as
Element objects.
|
java.lang.String |
Element.getChildText(java.lang.String cname,
Namespace ns)
Returns the textual content of the named child element, or null if
there's no such child.
|
java.lang.String |
Element.getChildTextNormalize(java.lang.String cname,
Namespace ns)
Returns the normalized textual content of the named child element, or
null if there's no such child.
|
java.lang.String |
Element.getChildTextTrim(java.lang.String cname,
Namespace ns)
Returns the trimmed textual content of the named child element, or null
if there's no such child.
|
boolean |
Element.removeAttribute(java.lang.String attname,
Namespace ns)
This removes the attribute with the given name and within the
given Namespace.
|
boolean |
Element.removeChild(java.lang.String cname,
Namespace ns)
This removes the first child element (one level deep) with the
given local name and belonging to the given namespace.
|
boolean |
Element.removeChildren(java.lang.String cname,
Namespace ns)
This removes all child elements (one level deep) with the
given local name and belonging to the given namespace.
|
void |
Element.removeNamespaceDeclaration(Namespace additionalNamespace)
Removes an additional namespace declarations from this element.
|
Element |
Element.setAttribute(java.lang.String name,
java.lang.String value,
Namespace ns)
This sets an attribute value for this element.
|
Element |
Element.setNamespace(Namespace namespace)
Sets the element's
Namespace . |
Attribute |
Attribute.setNamespace(Namespace namespace)
This sets this
Attribute 's . |
构造器和说明 |
---|
Attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace)
This will create a new
Attribute with the
specified (local) name, value, and type, and in the provided
. |
Attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace)
|
Attribute(java.lang.String name,
java.lang.String value,
Namespace namespace)
This will create a new
Attribute with the
specified (local) name and value, and in the provided
. |
Element(java.lang.String name,
Namespace namespace)
Creates a new element with the supplied (local) name and namespace.
|
限定符和类型 | 方法和说明 |
---|---|
static Filter<Attribute> |
Filters.attribute(Namespace ns)
Return a Filter that matches any
Attribute data with the
specified namespace. |
static Filter<Attribute> |
Filters.attribute(java.lang.String name,
Namespace ns)
Return a Filter that matches any
Attribute data with the
specified name and namespace. |
static Filter<Element> |
Filters.element(Namespace ns)
Return a Filter that matches any
Element data with the specified
Namespace. |
static Filter<Element> |
Filters.element(java.lang.String name,
Namespace ns)
Return a Filter that matches any
Element data with the specified
name and Namespace. |
构造器和说明 |
---|
AttributeFilter(Namespace namespace)
Select only the Attributes with the supplied Namespace.
|
AttributeFilter(java.lang.String name,
Namespace namespace)
Select only the Attributes with the supplied name and Namespace.
|
ElementFilter(Namespace namespace)
Select only the Elements with the supplied Namespace.
|
ElementFilter(java.lang.String name,
Namespace namespace)
Select only the Elements with the supplied name and Namespace.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
StAXFilter.includeElement(int depth,
java.lang.String name,
Namespace ns)
The current event is an Element event.
|
boolean |
DefaultStAXFilter.includeElement(int depth,
java.lang.String name,
Namespace ns) |
boolean |
StAXFilter.pruneElement(int depth,
java.lang.String name,
Namespace ns)
An Element is being included, and this is a child Element event of the
included parent Element.
|
boolean |
DefaultStAXFilter.pruneElement(int depth,
java.lang.String name,
Namespace ns) |
限定符和类型 | 方法和说明 |
---|---|
Element |
LocatedJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
构造器和说明 |
---|
LocatedElement(java.lang.String name,
Namespace namespace)
Creates a new element with the supplied (local) name and namespace.
|
限定符和类型 | 方法和说明 |
---|---|
Namespace[] |
NamespaceStack.getAllNamespacesForURI(java.lang.String uri)
Get all prefixes in the current scope that are bound to the specified URI.
|
Namespace |
NamespaceStack.getFirstNamespaceForURI(java.lang.String uri)
Get the first Namespace in the current scope that is bound to the specified URI.
|
Namespace |
NamespaceStack.getNamespaceForPrefix(java.lang.String prefix)
Get the Namespace in the current scope with the specified prefix.
|
Namespace |
NamespaceStack.getRebound(java.lang.String prefix)
If the specified prefix was bound in the previous bind level, and has
been rebound to a different URI in the current level, then return the
Namespace the the prefix was bound to before.
|
Namespace[] |
NamespaceStack.getScope()
Return a new array instance representing the current scope.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.Iterable<Namespace> |
NamespaceStack.addedForward()
Return an Iterable containing all the Namespaces introduced to the
current-level's scope.
|
java.lang.Iterable<Namespace> |
NamespaceStack.addedReverse()
Return an Iterable containing all the Namespaces introduced to the
current-level's scope but in reverse order to
NamespaceStack.addedForward() . |
java.util.Iterator<Namespace> |
NamespaceStack.iterator()
Get all the Namespaces in-scope at the current level of the stack.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
NamespaceStack.isInScope(Namespace ns)
Inspect the current scope and return true if the specified namespace is
in scope.
|
void |
NamespaceStack.push(Namespace... namespaces)
Create a new in-scope level for the Stack based on an arbitrary set of Namespaces.
|
限定符和类型 | 方法和说明 |
---|---|
void |
NamespaceStack.push(java.lang.Iterable<Namespace> namespaces)
Create a new in-scope level for the Stack based on an arbitrary set of Namespaces.
|
构造器和说明 |
---|
JDOMNamespaceContext(Namespace[] namespaces)
Create a read-only representation of the input namespace list.
|
NamespaceStack(Namespace[] seed)
Create a NamespaceWalker ready to use as a stack.
|
限定符和类型 | 方法和说明 |
---|---|
Namespace |
XPathExpression.getNamespace(java.lang.String prefix)
Get the Namespace associated with a given prefix.
|
Namespace |
XPathBuilder.getNamespace(java.lang.String prefix)
Get the Namespace associated with the given prefix.
|
Namespace[] |
XPathExpression.getNamespaces()
Get the Namespaces that were used to compile this XPathExpression.
|
限定符和类型 | 方法和说明 |
---|---|
abstract void |
XPath.addNamespace(Namespace namespace)
已过时。
Adds a namespace definition to the list of namespaces known of
this XPath expression.
|
abstract <T> XPathExpression<T> |
XPathFactory.compile(java.lang.String expression,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
Namespace... namespaces)
Create a Compiled XPathExpression<> instance from this factory.
|
java.lang.Object |
XPathExpression.getVariable(java.lang.String localname,
Namespace uri)
Get the variable value associated to the given variable name.
|
boolean |
XPathBuilder.setNamespace(Namespace namespace)
Define a Namespace to be available for the XPath expression.
|
java.lang.Object |
XPathExpression.setVariable(java.lang.String localname,
Namespace uri,
java.lang.Object value)
Change the defined value for a variable to some new value.
|
限定符和类型 | 方法和说明 |
---|---|
<T> XPathExpression<T> |
XPathFactory.compile(java.lang.String expression,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
java.util.Collection<Namespace> namespaces)
Create a XPathExpression<> instance from this factory.
|
boolean |
XPathBuilder.setNamespaces(java.util.Collection<Namespace> namespaces)
Add a number of namespaces to this XPathBuilder
|
限定符和类型 | 方法和说明 |
---|---|
void |
JDOMXPath.addNamespace(Namespace namespace)
已过时。
Adds a namespace definition to the list of namespaces known of this XPath
expression.
|
<T> XPathExpression<T> |
JaxenXPathFactory.compile(java.lang.String expression,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
Namespace... namespaces) |
限定符和类型 | 方法和说明 |
---|---|
Namespace |
AbstractXPathCompiled.getNamespace(java.lang.String prefix) |
Namespace[] |
AbstractXPathCompiled.getNamespaces() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
AbstractXPathCompiled.getVariable(java.lang.String name,
Namespace uri) |
java.lang.Object |
AbstractXPathCompiled.setVariable(java.lang.String name,
Namespace uri,
java.lang.Object value) |
构造器和说明 |
---|
AbstractXPathCompiled(java.lang.String query,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
Namespace[] namespaces)
Construct an XPathExpression.
|