public NodeList getChildNodes() { return delegateElement.getChildNodes(); }
public NodeList getChildNodes() { return delegateElement.getChildNodes(); }
public NodeList getChildNodes() { return delegateElement.getChildNodes(); }
public NodeList getChildNodes() { return delegateHeader.getChildNodes(); }
/** * The node immediately preceding this node. If there is no such node, * this returns <code>null</code>. */ public Node getPreviousSibling() { SOAPElement parent = getParentElement(); if (parent == null) { return null; } NodeList nl = parent.getChildNodes(); int len = nl.getLength(); int i = 0; Node previousSibling = null; while (i < len) { if (nl.item(i) == this) { return previousSibling; } previousSibling = nl.item(i); i++; } return previousSibling; // should be null. }
/** * The node immediately preceding this node. If there is no such node, * this returns <code>null</code>. */ public Node getPreviousSibling() { SOAPElement parent = getParentElement(); if (parent == null) { return null; } NodeList nl = parent.getChildNodes(); int len = nl.getLength(); int i = 0; Node previousSibling = null; while (i < len) { if (nl.item(i) == this) { return previousSibling; } previousSibling = nl.item(i); i++; } return previousSibling; // should be null. }
/** * The node immediately preceding this node. If there is no such node, * this returns <code>null</code>. */ public Node getPreviousSibling() { SOAPElement parent = getParentElement(); if (parent == null) { return null; } NodeList nl = parent.getChildNodes(); int len = nl.getLength(); int i = 0; Node previousSibling = null; while (i < len) { if (nl.item(i) == this) { return previousSibling; } previousSibling = nl.item(i); i++; } return previousSibling; // should be null. }
@Override protected void runTest() throws Throwable { SOAPElement parent = newSOAPFactory().createElement(new QName("parent")); SOAPElement child1 = parent.addChildElement(new QName("child1")); SOAPElement child2 = (SOAPElement)parent.getOwnerDocument().createElementNS(null, "child2"); child2.setParentElement(parent); NodeList children = parent.getChildNodes(); assertEquals(2, children.getLength()); assertSame(child1, children.item(0)); assertSame(child2, children.item(1)); } }
SOAPElement elementToRename = (SOAPElement) nodeToRename; SOAPElement newElement = parentElement.addChildElement(elementToRename.getElementName().getLocalName(), prefix); for (int index = 0; index < elementToRename.getChildNodes().getLength(); index++) { Node childNode = elementToRename.getChildNodes().item(index); cloneToNewNamespace(childNode, newElement, prefix);