public interface CoreElement extends CoreChildNode, CoreMixedContentContainer, CoreNamedNode, DeferringParentNode
COMPACT, COMPLETE, DISCARDED, INCOMPLETE| Modifier and Type | Method and Description |
|---|---|
void |
coreAppendAttribute(CoreAttribute attr)
Append an attribute to this element.
|
CoreAttribute |
coreGetAttribute(AttributeMatcher matcher,
String namespaceURI,
String name)
Get the first attribute selected by a given
AttributeMatcher. |
<T extends CoreAttribute,S> |
coreGetAttributesByType(Class<T> type,
Mapper<T,S> mapper,
Semantics semantics) |
CoreAttribute |
coreGetFirstAttribute()
Get the first attribute of this element.
|
CoreAttribute |
coreGetLastAttribute()
Get the last attribute of this element.
|
String |
coreLookupNamespaceURI(String prefix,
Semantics semantics)
Look up the namespace URI associated to the given prefix.
|
String |
coreLookupPrefix(String namespaceURI,
Semantics semantics)
Find a prefix associated to the given namespace URI.
|
boolean |
coreRemoveAttribute(AttributeMatcher matcher,
String namespaceURI,
String name,
Semantics semantics)
Remove an attribute based on a given
AttributeMatcher. |
CoreAttribute |
coreSetAttribute(AttributeMatcher matcher,
CoreAttribute attr,
Semantics semantics)
Add a new attribute or replace an existing attribute based on a given
AttributeMatcher. |
void |
coreSetAttribute(AttributeMatcher matcher,
String namespaceURI,
String name,
String prefix,
String value)
Create or update an attribute based on a given
AttributeMatcher. |
coreClone, coreDetach, coreGetNextSibling, coreGetNextSiblingIfAvailable, coreGetParentElementcoreGetCharacterDatacoreSetCharacterDatainitNamebuild, coreGetElements, coreSetBuilder, coreSetState, getBuilder, getStateCoreAttribute coreGetFirstAttribute()
null if this element has no attributesCoreAttribute coreGetLastAttribute()
null if this element has no attributesCoreAttribute coreGetAttribute(AttributeMatcher matcher, String namespaceURI, String name)
AttributeMatcher.matcher - the AttributeMatcher implementation to usenamespaceURI - the namespaceURI parameter to pass to
AttributeMatcher.matches(CoreAttribute, String, String)name - the name parameter to pass to
AttributeMatcher.matches(CoreAttribute, String, String)null if no matching attribute was
foundvoid coreSetAttribute(AttributeMatcher matcher, String namespaceURI, String name, String prefix, String value)
AttributeMatcher.matcher - the AttributeMatcher implementation to usenamespaceURI - the namespaceURI parameter to pass to
AttributeMatcher.matches(CoreAttribute, String, String) and
AttributeMatcher.createAttribute(CoreElement, String, String, String, String)name - the name parameter to pass to
AttributeMatcher.matches(CoreAttribute, String, String) and
AttributeMatcher.createAttribute(CoreElement, String, String, String, String)prefix - the prefix parameter to pass to
AttributeMatcher.createAttribute(CoreElement, String, String, String, String)
and AttributeMatcher.update(CoreAttribute, String, String)value - the value parameter to pass to
AttributeMatcher.createAttribute(CoreElement, String, String, String, String)
and AttributeMatcher.update(CoreAttribute, String, String)CoreAttribute coreSetAttribute(AttributeMatcher matcher, CoreAttribute attr, Semantics semantics)
AttributeMatcher. If a matching attribute on this element is found, it is replaced by
the specified attribute. If no matching attribute is found, then the specified attribute is
added to this element. If the attribute is already owned by this element, then calling this
method has no effect.matcher - the AttributeMatcher implementation to useattr - the new attribute to addsemantics - determines the new owner document for the replaced attributenull if no
matching attribute existed.void coreAppendAttribute(CoreAttribute attr)
attr - the attribute to appendboolean coreRemoveAttribute(AttributeMatcher matcher, String namespaceURI, String name, Semantics semantics)
AttributeMatcher.matcher - the AttributeMatcher implementation to usenamespaceURI - the namespaceURI parameter to pass to
AttributeMatcher.matches(CoreAttribute, String, String)name - the name parameter to pass to
AttributeMatcher.matches(CoreAttribute, String, String)true if a matching attribute was found (and has been removed),
false if no matching attribute was found<T extends CoreAttribute,S> Iterator<S> coreGetAttributesByType(Class<T> type, Mapper<T,S> mapper, Semantics semantics)
String coreLookupNamespaceURI(String prefix, Semantics semantics)
prefix - The prefix to look for. If this parameter is the empty string, then the URI of the
default namespace will be returned.semantics - The API semantics to use.null if the prefix is not bound; if the prefix is
the empty string and no default namespace declaration exists, then an empty string is
returnedSemantics.isUseStrictNamespaceLookup()String coreLookupPrefix(String namespaceURI, Semantics semantics)
namespaceURI - The namespace URI to look for. This parameter must not be null (XML
forbids to bind a prefix to the null namespace).semantics - The API semantics to use.null if none is foundIllegalArgumentException - if namespaceURI is nullSemantics.isUseStrictNamespaceLookup()Copyright © The Apache Software Foundation. All Rights Reserved.