public class ElementImpl extends Object implements SOAPElement, SOAPBodyElement
| Modifier and Type | Field and Description |
|---|---|
static String |
DSIG_NS |
protected QName |
elementQName |
protected static Logger |
log |
static String |
WSU_NS |
static String |
XENC_NS |
static String |
XML_URI
The XML Namespace ("http://www.w3.org/XML/1998/namespace").
|
static String |
XMLNS_URI
XML Information Set REC
all namespace attributes (including those named xmlns,
whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
ElementImpl(SOAPDocumentImpl ownerDoc,
Element domElement) |
ElementImpl(SOAPDocumentImpl ownerDoc,
Name name) |
ElementImpl(SOAPDocumentImpl ownerDoc,
QName name) |
ElementImpl(SOAPDocumentImpl ownerDoc,
String uri,
String qualifiedName) |
| Modifier and Type | Method and Description |
|---|---|
SOAPElement |
addAttribute(Name name,
String value)
Adds an attribute with the specified name and value to this
SOAPElement object. |
SOAPElement |
addAttribute(QName qname,
String value)
Adds an attribute with the specified name and value to this
SOAPElement object. |
protected SOAPElement |
addCDATA(String text) |
SOAPElement |
addChildElement(Name name)
Creates a new
SOAPElement object initialized with the
given Name object and adds the new element to this
SOAPElement object. |
SOAPElement |
addChildElement(QName qname)
Creates a new
SOAPElement object initialized with the given
QName object and adds the new element to this SOAPElement
object. |
SOAPElement |
addChildElement(SOAPElement element)
Add a
SOAPElement as a child of this
SOAPElement instance. |
SOAPElement |
addChildElement(String localName)
Creates a new
SOAPElement object initialized with the
specified local name and adds the new element to this
SOAPElement object. |
SOAPElement |
addChildElement(String localName,
String prefix)
Creates a new
SOAPElement object initialized with the
specified local name and prefix and adds the new element to this
SOAPElement object. |
SOAPElement |
addChildElement(String localName,
String prefix,
String uri)
Creates a new
SOAPElement object initialized with the
specified local name, prefix, and URI and adds the new element to this
SOAPElement object. |
protected SOAPElement |
addElement(Name name) |
protected SOAPElement |
addElement(QName name) |
SOAPElement |
addNamespaceDeclaration(String prefix,
String uri)
Adds a namespace declaration with the specified prefix and URI to this
SOAPElement object. |
protected void |
addNode(Node newElement) |
protected SOAPElement |
addText(String text) |
SOAPElement |
addTextNode(String text)
Creates a new
Text object initialized with the given
String and adds it to this SOAPElement object. |
Node |
appendChild(Node newChild) |
Node |
cloneNode(boolean deep) |
short |
compareDocumentPosition(Node other) |
protected SOAPElement |
convertToSoapElement(Element element) |
protected TextImpl |
convertToSoapText(CharacterData characterData) |
protected SOAPElement |
createElement(Name name) |
protected SOAPElement |
createElement(QName name) |
QName |
createQName(String localName,
String prefix)
Creates a
QName whose namespace URI is the one associated
with the parameter, prefix, in the context of this
SOAPElement. |
void |
detachNode()
Removes this
Node object from the tree. |
protected Iterator<String> |
doGetNamespacePrefixes(boolean deep) |
void |
ensureNamespaceIsDeclared(String prefix,
String uri) |
protected SOAPElement |
findAndConvertChildElement(NameImpl name) |
protected SOAPElement |
findChild(NameImpl name) |
protected void |
findEncodingStyleAttributeName() |
Iterator<Name> |
getAllAttributes()
Returns an
Iterator over all of the attribute
Name objects in this
SOAPElement object. |
Iterator<QName> |
getAllAttributesAsQNames()
Returns an
Iterator over all of the attributes
in this SOAPElement as QName objects. |
protected static Iterator<Name> |
getAllAttributesFrom(Element element) |
String |
getAttribute(String name) |
Attr |
getAttributeNode(String name) |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName) |
String |
getAttributeNS(String namespaceURI,
String localName) |
NamedNodeMap |
getAttributes() |
String |
getAttributeValue(Name name)
Returns the value of the attribute with the specified name.
|
String |
getAttributeValue(QName qname)
Returns the value of the attribute with the specified qname.
|
protected static String |
getAttributeValueFrom(Element element,
Name name) |
String |
getBaseURI() |
protected Iterator<Node> |
getChildElementNodes() |
Iterator<Node> |
getChildElements()
Returns an
Iterator over all the immediate child
Nodes of this element. |
Iterator<Node> |
getChildElements(Name name)
Returns an
Iterator over all the immediate child
Nodes of this element with the specified name. |
Iterator<Node> |
getChildElements(QName qname)
Returns an
Iterator over all the immediate child
Nodes of this element with the specified qname. |
protected Iterator<Node> |
getChildElementsFrom(Element element) |
NodeList |
getChildNodes() |
Element |
getDomElement() |
Name |
getElementName()
Returns the name of this
SOAPElement object. |
QName |
getElementQName()
Returns the qname of this
SOAPElement object. |
NodeList |
getElementsByTagName(String name) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
String |
getEncodingStyle()
Returns the encoding style for this
SOAPElement object. |
Object |
getFeature(String feature,
String version) |
Node |
getFirstChild() |
Node |
getLastChild() |
String |
getLocalName() |
static String |
getLocalPart(String qualifiedName) |
protected Attr |
getNamespaceAttr(String prefix) |
protected static Attr |
getNamespaceAttrFrom(Element element,
String prefix) |
NamespaceContextIterator |
getNamespaceContextNodes() |
NamespaceContextIterator |
getNamespaceContextNodes(boolean traverseStack) |
String |
getNamespacePrefix(String uri) |
Iterator<String> |
getNamespacePrefixes()
Returns an
Iterator over the namespace prefix
Strings declared by this element. |
String |
getNamespaceURI() |
String |
getNamespaceURI(String prefix)
Returns the URI of the namespace that has the given prefix.
|
Node |
getNextSibling() |
String |
getNodeName() |
short |
getNodeType() |
String |
getNodeValue() |
Document |
getOwnerDocument() |
SOAPElement |
getParentElement()
Returns the parent element of this
Node object. |
Node |
getParentNode() |
String |
getPrefix() |
static String |
getPrefix(String qualifiedName) |
Node |
getPreviousSibling() |
static String |
getQualifiedName(QName name) |
TypeInfo |
getSchemaTypeInfo() |
SOAPDocumentImpl |
getSoapDocument() |
protected String |
getSOAPNamespace() |
String |
getTagName() |
String |
getTextContent() |
Object |
getUserData(String key) |
String |
getValue()
Returns the value of this node if this is a
Text node or the
value of the immediate child of this node otherwise. |
protected Node |
getValueNode() |
protected Node |
getValueNodeStrict() |
Iterator<String> |
getVisibleNamespacePrefixes()
Returns an
Iterator over the namespace prefix
Strings visible to this element. |
boolean |
hasAttribute(String name) |
boolean |
hasAttributeNS(String namespaceURI,
String localName) |
boolean |
hasAttributes() |
boolean |
hasChildNodes() |
protected Element |
importElement(Element element) |
Node |
insertBefore(Node newChild,
Node refChild) |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isEqualNode(Node arg) |
protected boolean |
isNamespaceQualified(Name name) |
protected boolean |
isNamespaceQualified(QName name) |
boolean |
isSameNode(Node other) |
boolean |
isSupported(String feature,
String version) |
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
void |
normalize() |
void |
recycleNode()
Notifies the implementation that this
Node
object is no longer being used by the application and that the
implementation is free to reuse this object for nodes that may
be created later. |
boolean |
removeAttribute(Name name)
Removes the attribute with the specified name.
|
boolean |
removeAttribute(QName name)
Removes the attribute with the specified qname.
|
void |
removeAttribute(String name) |
Attr |
removeAttributeNode(Attr oldAttr) |
void |
removeAttributeNS(String namespaceURI,
String localName) |
Node |
removeChild(Node oldChild) |
void |
removeContents()
Detaches all children of this
SOAPElement. |
boolean |
removeNamespaceDeclaration(String prefix)
Removes the namespace declaration corresponding to the given prefix.
|
Node |
replaceChild(Node newChild,
Node oldChild) |
protected SOAPElement |
replaceElementWithSOAPElement(Element element,
ElementImpl copy) |
void |
setAttribute(String name,
String value) |
Attr |
setAttributeNode(Attr newAttr) |
Attr |
setAttributeNodeNS(Attr newAttr) |
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value) |
SOAPElement |
setElementQName(QName newName)
Changes the name of this
Element to newName if
possible. |
void |
setEncodingStyle(String encodingStyle)
Sets the encoding style for this
SOAPElement object
to one specified. |
protected void |
setEncodingStyleNamespace(String soapNamespace,
String soapNamespacePrefix) |
void |
setIdAttribute(String name,
boolean isId) |
void |
setIdAttributeNode(Attr idAttr,
boolean isId) |
void |
setIdAttributeNS(String namespaceURI,
String localName,
boolean isId) |
void |
setNodeValue(String nodeValue) |
void |
setParentElement(SOAPElement element)
Sets the parent of this
Node object to the given
SOAPElement object. |
void |
setPrefix(String prefix) |
void |
setTextContent(String textContent) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler) |
void |
setValue(String value)
If this is a Text node then this method will set its value,
otherwise it sets the value of the immediate (Text) child of this node.
|
void |
tryToFindEncodingStyleAttributeName() |
public static final String DSIG_NS
public static final String XENC_NS
public static final String WSU_NS
protected QName elementQName
protected static final Logger log
public static final String XMLNS_URI
public static final String XML_URI
public ElementImpl(SOAPDocumentImpl ownerDoc, Name name)
public ElementImpl(SOAPDocumentImpl ownerDoc, QName name)
public ElementImpl(SOAPDocumentImpl ownerDoc, Element domElement)
public ElementImpl(SOAPDocumentImpl ownerDoc, String uri, String qualifiedName)
public String getTagName()
getTagName in interface Elementpublic String getAttribute(String name)
getAttribute in interface Elementpublic void setAttribute(String name, String value) throws DOMException
setAttribute in interface ElementDOMExceptionpublic void removeAttribute(String name) throws DOMException
removeAttribute in interface ElementDOMExceptionpublic Attr getAttributeNode(String name)
getAttributeNode in interface Elementpublic Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode in interface ElementDOMExceptionpublic Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode in interface ElementDOMExceptionpublic NodeList getElementsByTagName(String name)
getElementsByTagName in interface Elementpublic String getAttributeNS(String namespaceURI, String localName) throws DOMException
getAttributeNS in interface ElementDOMExceptionpublic Document getOwnerDocument()
getOwnerDocument in interface Nodepublic Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore in interface NodeDOMExceptionpublic Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild in interface NodeDOMExceptionpublic Node removeChild(Node oldChild) throws DOMException
removeChild in interface NodeDOMExceptionpublic Node appendChild(Node newChild) throws DOMException
appendChild in interface NodeDOMExceptionpublic boolean hasChildNodes()
hasChildNodes in interface Nodepublic boolean isSupported(String feature, String version)
isSupported in interface Nodepublic String getNamespaceURI()
getNamespaceURI in interface Nodepublic void setPrefix(String prefix) throws DOMException
setPrefix in interface NodeDOMExceptionpublic String getLocalName()
getLocalName in interface Nodepublic boolean hasAttributes()
hasAttributes in interface Nodepublic String getBaseURI()
getBaseURI in interface Nodepublic short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition in interface NodeDOMExceptionpublic String getTextContent() throws DOMException
getTextContent in interface NodeDOMExceptionpublic void setTextContent(String textContent) throws DOMException
setTextContent in interface NodeDOMExceptionpublic boolean isSameNode(Node other)
isSameNode in interface Nodepublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface Nodepublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface Nodepublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface Nodepublic boolean isEqualNode(Node arg)
isEqualNode in interface Nodepublic Object getFeature(String feature, String version)
getFeature in interface Nodepublic Object setUserData(String key, Object data, UserDataHandler handler)
setUserData in interface Nodepublic Object getUserData(String key)
getUserData in interface Nodepublic SOAPElement addChildElement(Name name) throws SOAPException
SOAPElementSOAPElement object initialized with the
given Name object and adds the new element to this
SOAPElement object.
This method may be deprecated in a future release of SAAJ in favor of addChildElement(javax.xml.namespace.QName)
addChildElement in interface SOAPElementname - a Name object with the XML name for the
new elementSOAPElement object that was createdSOAPException - if there is an error in creating the
SOAPElement objectSOAPElement.addChildElement(javax.xml.namespace.QName)public SOAPElement addChildElement(QName qname) throws SOAPException
SOAPElementSOAPElement object initialized with the given
QName object and adds the new element to this SOAPElement
object. The namespace, localname and prefix of the new
SOAPElement are all taken from the qname argument.addChildElement in interface SOAPElementqname - a QName object with the XML name for the
new elementSOAPElement object that was createdSOAPException - if there is an error in creating the
SOAPElement objectSOAPElement.addChildElement(Name)public SOAPElement addChildElement(String localName) throws SOAPException
SOAPElementSOAPElement object initialized with the
specified local name and adds the new element to this
SOAPElement object.
The new SOAPElement inherits any in-scope default namespace.addChildElement in interface SOAPElementlocalName - a String giving the local name for
the elementSOAPElement object that was createdSOAPException - if there is an error in creating the
SOAPElement objectpublic SOAPElement addChildElement(String localName, String prefix) throws SOAPException
SOAPElementSOAPElement object initialized with the
specified local name and prefix and adds the new element to this
SOAPElement object.addChildElement in interface SOAPElementlocalName - a String giving the local name for
the new elementprefix - a String giving the namespace prefix for
the new elementSOAPElement object that was createdSOAPException - if the prefix is not valid in the
context of this SOAPElement or if there is an error in creating the
SOAPElement objectpublic String getNamespaceURI(String prefix)
SOAPElementgetNamespaceURI in interface SOAPElementprefix - a String giving the prefix of the namespace
for which to searchString with the uri of the namespace that has
the given prefixpublic SOAPElement setElementQName(QName newName) throws SOAPException
SOAPElementElement to newName if
possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
etc. cannot have their names changed using this method. Any attempt to do
so will result in a SOAPException being thrown.
Callers should not rely on the element instance being renamed as is.
Implementations could end up copying the content of the
SOAPElement to a renamed instance.
setElementQName in interface SOAPElementnewName - the new name for the Element.SOAPException - if changing the name of this Element
is not allowed.public QName createQName(String localName, String prefix) throws SOAPException
SOAPElementQName whose namespace URI is the one associated
with the parameter, prefix, in the context of this
SOAPElement. The remaining elements of the new
QName are taken directly from the parameters,
localName and prefix.createQName in interface SOAPElementlocalName - a String containing the local part of the name.prefix - a String containing the prefix for the name.QName with the specified localName
and prefix, and with a namespace that is associated
with the prefix in the context of this
SOAPElement. This namespace will be the same as
the one that would be returned by
SOAPElement.getNamespaceURI(String) if it were given
prefix as it's parameter.SOAPException - if the QName cannot be created.public NamespaceContextIterator getNamespaceContextNodes()
public NamespaceContextIterator getNamespaceContextNodes(boolean traverseStack)
public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
SOAPElementSOAPElement object initialized with the
specified local name, prefix, and URI and adds the new element to this
SOAPElement object.addChildElement in interface SOAPElementlocalName - a String giving the local name for
the new elementprefix - a String giving the namespace prefix for
the new elementuri - a String giving the URI of the namespace
to which the new element belongsSOAPElement object that was createdSOAPException - if there is an error in creating the
SOAPElement objectpublic SOAPElement addChildElement(SOAPElement element) throws SOAPException
SOAPElementSOAPElement as a child of this
SOAPElement instance. The SOAPElement
is expected to be created by a
SOAPFactory. Callers should not rely on the
element instance being added as is into the XML
tree. Implementations could end up copying the content
of the SOAPElement passed into an instance of
a different SOAPElement implementation. For
instance if addChildElement() is called on a
SOAPHeader, element will be copied
into an instance of a SOAPHeaderElement.
The fragment rooted in element is either added
as a whole or not at all, if there was an error.
The fragment rooted in element cannot contain
elements named "Envelope", "Header" or "Body" and in the SOAP
namespace. Any namespace prefixes present in the fragment
should be fully resolved using appropriate namespace
declarations within the fragment itself.
addChildElement in interface SOAPElementelement - the SOAPElement to be added as a
new childSOAPException - if there was an error in adding this
element as a childprotected SOAPElement addElement(Name name) throws SOAPException
SOAPExceptionprotected SOAPElement addElement(QName name) throws SOAPException
SOAPExceptionprotected SOAPElement createElement(Name name)
protected SOAPElement createElement(QName name)
protected void addNode(Node newElement) throws SOAPException
SOAPExceptionprotected SOAPElement findChild(NameImpl name)
protected SOAPElement findAndConvertChildElement(NameImpl name)
public SOAPElement addTextNode(String text) throws SOAPException
SOAPElementText object initialized with the given
String and adds it to this SOAPElement object.addTextNode in interface SOAPElementtext - a String object with the textual content to be addedSOAPElement object into which
the new Text object was insertedSOAPException - if there is an error in creating the
new Text object or if it is not legal to
attach it as a child to this
SOAPElementprotected SOAPElement addCDATA(String text) throws SOAPException
SOAPExceptionprotected SOAPElement addText(String text) throws SOAPException
SOAPExceptionpublic SOAPElement addAttribute(Name name, String value) throws SOAPException
SOAPElementSOAPElement object.addAttribute in interface SOAPElementname - a Name object with the name of the attributevalue - a String giving the value of the attributeSOAPElement object into which the attribute was
insertedSOAPException - if there is an error in creating the
Attribute, or it is invalid to set
an attribute with Name
name on this SOAPElement.SOAPElement.addAttribute(javax.xml.namespace.QName, String)public SOAPElement addAttribute(QName qname, String value) throws SOAPException
SOAPElementSOAPElement object.addAttribute in interface SOAPElementqname - a QName object with the name of the attributevalue - a String giving the value of the attributeSOAPElement object into which the attribute was
insertedSOAPException - if there is an error in creating the
Attribute, or it is invalid to set
an attribute with QName
qname on this SOAPElement.SOAPElement.addAttribute(Name, String)public SOAPElement addNamespaceDeclaration(String prefix, String uri) throws SOAPException
SOAPElementSOAPElement object.addNamespaceDeclaration in interface SOAPElementprefix - a String giving the prefix of the namespaceuri - a String giving the uri of the namespaceSOAPElement object into which this
namespace declaration was inserted.SOAPException - if there is an error in creating the
namespacepublic String getAttributeValue(Name name)
SOAPElementgetAttributeValue in interface SOAPElementname - a Name object with the name of the attributeString giving the value of the specified
attribute, Null if there is no such attributeSOAPElement.getAttributeValue(javax.xml.namespace.QName)public String getAttributeValue(QName qname)
SOAPElementgetAttributeValue in interface SOAPElementqname - a QName object with the qname of the attributeString giving the value of the specified
attribute, Null if there is no such attributeSOAPElement.getAttributeValue(Name)public Iterator<Name> getAllAttributes()
SOAPElementIterator over all of the attribute
Name objects in this
SOAPElement object. The iterator can be used to get
the attribute names, which can then be passed to the method
getAttributeValue to retrieve the value of each
attribute.getAllAttributes in interface SOAPElementSOAPElement.getAllAttributesAsQNames()public Iterator<QName> getAllAttributesAsQNames()
SOAPElementIterator over all of the attributes
in this SOAPElement as QName objects.
The iterator can be used to get the attribute QName, which can then
be passed to the method getAttributeValue to retrieve
the value of each attribute.getAllAttributesAsQNames in interface SOAPElementSOAPElement.getAllAttributes()public Iterator<String> getNamespacePrefixes()
SOAPElementIterator over the namespace prefix
Strings declared by this element. The prefixes returned by
this iterator can be passed to the method
getNamespaceURI to retrieve the URI of each namespace.getNamespacePrefixes in interface SOAPElementSOAPElement objectpublic Iterator<String> getVisibleNamespacePrefixes()
SOAPElementIterator over the namespace prefix
Strings visible to this element. The prefixes returned by
this iterator can be passed to the method
getNamespaceURI to retrieve the URI of each namespace.getVisibleNamespacePrefixes in interface SOAPElementSOAPElement objectpublic Name getElementName()
SOAPElementSOAPElement object.getElementName in interface SOAPElementName object with the name of this
SOAPElement objectpublic QName getElementQName()
SOAPElementSOAPElement object.getElementQName in interface SOAPElementQName object with the qname of this
SOAPElement objectSOAPElement.getElementName()public boolean removeAttribute(Name name)
SOAPElementremoveAttribute in interface SOAPElementname - the Name object with the name of the
attribute to be removedtrue if the attribute was
removed successfully; false if it was notSOAPElement.removeAttribute(javax.xml.namespace.QName)public boolean removeAttribute(QName name)
SOAPElementremoveAttribute in interface SOAPElementname - the QName object with the qname of the
attribute to be removedtrue if the attribute was
removed successfully; false if it was notSOAPElement.removeAttribute(Name)public boolean removeNamespaceDeclaration(String prefix)
SOAPElementremoveNamespaceDeclaration in interface SOAPElementprefix - a String giving the prefix for which
to searchtrue if the namespace declaration was
removed successfully; false if it was notpublic Iterator<Node> getChildElements()
SOAPElementIterator over all the immediate child
Nodes of this element. This includes javax.xml.soap.Text
objects as well as SOAPElement objects.
Calling this method may cause child Element,
SOAPElement and org.w3c.dom.Text nodes to be
replaced by SOAPElement, SOAPHeaderElement,
SOAPBodyElement or javax.xml.soap.Text nodes as
appropriate for the type of this parent node. As a result the calling
application must treat any existing references to these child nodes that
have been obtained through DOM APIs as invalid and either discard them or
refresh them with the values returned by this Iterator. This
behavior can be avoided by calling the equivalent DOM APIs. See
javax.xml.soap
for more details.
getChildElements in interface SOAPElementSOAPElement
objectprotected SOAPElement convertToSoapElement(Element element)
protected TextImpl convertToSoapText(CharacterData characterData)
protected SOAPElement replaceElementWithSOAPElement(Element element, ElementImpl copy)
public Iterator<Node> getChildElements(Name name)
SOAPElementIterator over all the immediate child
Nodes of this element with the specified name. All of these
children will be SOAPElement nodes.
Calling this method may cause child Element,
SOAPElement and org.w3c.dom.Text nodes to be
replaced by SOAPElement, SOAPHeaderElement,
SOAPBodyElement or javax.xml.soap.Text nodes as
appropriate for the type of this parent node. As a result the calling
application must treat any existing references to these child nodes that
have been obtained through DOM APIs as invalid and either discard them or
refresh them with the values returned by this Iterator. This
behavior can be avoided by calling the equivalent DOM APIs. See
javax.xml.soap
for more details.
getChildElements in interface SOAPElementname - a Name object with the name of the child
elements to be returnedIterator object over all the elements
in this SOAPElement object with the
specified nameSOAPElement.getChildElements(javax.xml.namespace.QName)public Iterator<Node> getChildElements(QName qname)
SOAPElementIterator over all the immediate child
Nodes of this element with the specified qname. All of these
children will be SOAPElement nodes.
Calling this method may cause child Element,
SOAPElement and org.w3c.dom.Text nodes to be
replaced by SOAPElement, SOAPHeaderElement,
SOAPBodyElement or javax.xml.soap.Text nodes as
appropriate for the type of this parent node. As a result the calling
application must treat any existing references to these child nodes that
have been obtained through DOM APIs as invalid and either discard them or
refresh them with the values returned by this Iterator. This
behavior can be avoided by calling the equivalent DOM APIs. See
javax.xml.soap
for more details.
getChildElements in interface SOAPElementqname - a QName object with the qname of the child
elements to be returnedIterator object over all the elements
in this SOAPElement object with the
specified qnameSOAPElement.getChildElements(Name)public void removeContents()
SOAPElementSOAPElement.
This method is useful for rolling back the construction of partially
completed SOAPHeaders and SOAPBodys in
preparation for sending a fault when an error condition is detected. It
is also useful for recycling portions of a document within a SOAP
message.
removeContents in interface SOAPElementpublic void setEncodingStyle(String encodingStyle) throws SOAPException
SOAPElementSOAPElement object
to one specified.setEncodingStyle in interface SOAPElementencodingStyle - a String giving the encoding styleSOAPException - if setting the encodingStyle is invalid for this SOAPElement.SOAPElement.getEncodingStyle()public String getEncodingStyle()
SOAPElementSOAPElement object.getEncodingStyle in interface SOAPElementString giving the encoding styleSOAPElement.setEncodingStyle(java.lang.String)public String getValue()
NodeText node or the
value of the immediate child of this node otherwise.
If there is an immediate child of this Node that it is a
Text node then it's value will be returned. If there is
more than one Text node then the value of the first
Text Node will be returned.
Otherwise null is returned.String with the text of this node if this is a
Text node or the text contained by the first
immediate child of this Node object that is a
Text object if such a child exists;
null otherwise.public void setValue(String value)
NodeText node, or if
there are no children in which case a child Text node will be
created.protected Node getValueNodeStrict()
protected Node getValueNode()
public void setParentElement(SOAPElement element) throws SOAPException
NodeNode object to the given
SOAPElement object.element - the SOAPElement object to be set as
the parent of this Node objectSOAPException - if there is a problem in setting the
parent to the given elementNode.getParentElement()protected void findEncodingStyleAttributeName()
throws SOAPException
SOAPExceptionprotected void setEncodingStyleNamespace(String soapNamespace, String soapNamespacePrefix) throws SOAPException
SOAPExceptionpublic SOAPElement getParentElement()
NodeNode object.
This method can throw an UnsupportedOperationException
if the tree is not kept in memory.SOAPElement object that is the parent of
this Node object or null if this
Node object is rootNode.setParentElement(javax.xml.soap.SOAPElement)protected String getSOAPNamespace()
public void detachNode()
NodeNode object from the tree.public void tryToFindEncodingStyleAttributeName()
public void recycleNode()
NodeNode
object is no longer being used by the application and that the
implementation is free to reuse this object for nodes that may
be created later.
Calling the method recycleNode implies that the method
detachNode has been called previously.
protected boolean isNamespaceQualified(Name name)
protected boolean isNamespaceQualified(QName name)
public void setAttributeNS(String namespaceURI, String qualifiedName, String value)
setAttributeNS in interface Elementpublic void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS in interface ElementDOMExceptionpublic Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException
getAttributeNodeNS in interface ElementDOMExceptionpublic Attr setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS in interface ElementDOMExceptionpublic NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException
getElementsByTagNameNS in interface ElementDOMExceptionpublic boolean hasAttribute(String name)
hasAttribute in interface Elementpublic boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException
hasAttributeNS in interface ElementDOMExceptionpublic TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface Elementpublic void setIdAttribute(String name, boolean isId) throws DOMException
setIdAttribute in interface ElementDOMExceptionpublic void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
setIdAttributeNS in interface ElementDOMExceptionpublic void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
setIdAttributeNode in interface ElementDOMExceptionpublic String getNodeName()
getNodeName in interface Nodepublic String getNodeValue() throws DOMException
getNodeValue in interface NodeDOMExceptionpublic void setNodeValue(String nodeValue) throws DOMException
setNodeValue in interface NodeDOMExceptionpublic short getNodeType()
getNodeType in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic NodeList getChildNodes()
getChildNodes in interface Nodepublic Node getFirstChild()
getFirstChild in interface Nodepublic Node getLastChild()
getLastChild in interface Nodepublic Node getPreviousSibling()
getPreviousSibling in interface Nodepublic Node getNextSibling()
getNextSibling in interface Nodepublic NamedNodeMap getAttributes()
getAttributes in interface Nodepublic Element getDomElement()
public SOAPDocumentImpl getSoapDocument()
Copyright © 2019 JBoss by Red Hat. All rights reserved.