| Constructor and Description |
|---|
DomElement(org.w3c.dom.Element elem) |
| 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.
|
static Element |
parseString(java.lang.String xml) |
public static Element parseString(java.lang.String xml) throws ToolsException
ToolsExceptionpublic java.lang.String getLocalName()
ElementgetLocalName in interface Elementnull
nor empty.public java.lang.String getNamespaceUri()
ElementgetNamespaceUri in interface Elementnull).public java.lang.String getDisplayName()
ElementgetDisplayName in interface Elementnull nor empty.public java.lang.String getAttribute(java.lang.String local_name)
ElementgetAttribute in interface Elementlocal_name - The local name of the attribute to look for. The
attribute is looked for in no namespace.public java.lang.Iterable<Attribute> attributes()
Elementattributes in interface Elementpublic boolean hasNoNsChild()
ElementhasNoNsChild in interface Elementtrue if there is any child in no namespace.public java.lang.Iterable<Element> children()
Elementpublic java.lang.Iterable<Element> children(java.lang.String ns)
Elementpublic void noOtherNCNameAttribute(java.lang.String[] names,
java.lang.String[] forbidden_ns)
throws ToolsException
Elementelem 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.noOtherNCNameAttribute in interface Elementnames - 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.public Sequence getContent()
ElementgetContent in interface Elementpublic javax.xml.namespace.QName parseQName(java.lang.String value)
throws ToolsException
ElementparseQName in interface Elementvalue - The literal QName to parse.ToolsExceptionCopyright © 2015-2019 EXPath. All Rights Reserved