public interface Element
| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<Attribute> |
attributes()
Iterate through the attributes.
|
java.lang.Iterable<Element> |
children()
Iterate through the children elements.
|
java.lang.Iterable<Element> |
children(java.lang.String ns)
Iterate through the children elements in a specific namespace.
|
java.lang.String |
getAttribute(java.lang.String local_name)
Return the value of an attribute.
|
Sequence |
getContent()
Return the content of the element (the content of the child:: axis).
|
java.lang.String |
getDisplayName()
Get the display name of the element.
|
java.lang.String |
getLocalName()
Get the local part of the name of the element.
|
java.lang.String |
getNamespaceUri()
Return the namespace URI part of the name of the element.
|
boolean |
hasNoNsChild()
Return true if this element has at least one child in no namespace.
|
void |
noOtherNCNameAttribute(java.lang.String[] names,
java.lang.String[] forbidden_ns)
Check the element
elem does not have attributes other than names. |
javax.xml.namespace.QName |
parseQName(java.lang.String value)
Parse a literal QName using the namespace bindings in scope on the element.
|
java.lang.String getLocalName()
null
nor empty.java.lang.String getNamespaceUri()
null).java.lang.String getDisplayName()
null nor empty.java.lang.String getAttribute(java.lang.String local_name)
local_name - The local name of the attribute to look for. The
attribute is looked for in no namespace.java.lang.Iterable<Attribute> attributes()
boolean hasNoNsChild()
true if there is any child in no namespace.java.lang.Iterable<Element> children()
java.lang.Iterable<Element> children(java.lang.String ns)
ns - The namespace to use.void noOtherNCNameAttribute(java.lang.String[] names,
java.lang.String[] forbidden_ns)
throws ToolsException
elem does not have attributes other than names.
names contains non-qualified names, for allowed attributes. The
element can have other attributes in other namespace (not in the forbidden
namespaces) but no attributes in no namespace.names - The non-qualified names of allowed attributes (cannot be
null, but can be empty.)forbidden_ns - The forbidden namespaces, no attribute can be in any
of those namespaces.ToolsException - If the element contains an attribute in any of the
forbidden namespaces, or in no namespace and the name of which is not in
names.Sequence getContent() throws ToolsException
ToolsException - if an error occurs whilst retrieving the contentjavax.xml.namespace.QName parseQName(java.lang.String value)
throws ToolsException
value - The literal QName to parse.ToolsException - if an error occurs whilst parsing the QNameCopyright © 2015-2020 EXPath. All Rights Reserved