Examples of detach()


Examples of nu.xom.ProcessingInstruction.detach()

      ProcessingInstruction pi = (ProcessingInstruction)piNodes.get(i);
      ParentNode piParent = pi.getParent();
      int index = piParent.indexOf(pi);
      Element e = new Element("pi-proxy");
      e.addAttribute(new Attribute("pinumber", Integer.toString(i)));
      pi.detach();
      piParent.insertChild(e, index);
      procInstructions.add(pi);
    }   
  }
 
View Full Code Here

Examples of nu.xom.Text.detach()

    public void testDetach() {
       
        Text text = new Text("This will be attached then detached");
        empty.appendChild(text);
        assertEquals(empty, text.getParent());
        text.detach();
        assertNull(text.getParent());
       
    }

   
View Full Code Here

Examples of org.apache.axiom.om.OMElement.detach()

                OMElement om = (OMElement) o;
                OMNamespace ns = om.getNamespace();
                if (ns != null && (
                    AddressingConstants.Submission.WSA_NAMESPACE.equals(ns.getNamespaceURI()) ||
                        AddressingConstants.Final.WSA_NAMESPACE.equals(ns.getNamespaceURI()))) {
                    om.detach();
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.axiom.om.OMNode.detach()

            synCtx.getEnvelope().getHeader().addChild(child);
          }

                } else {
                    sourceNode.insertSiblingAfter(result);
                    sourceNode.detach();
                }
            }

        } catch (TransformerException e) {
            handleException("Error performing XSLT transformation using : " + xsltKey, e, synCtx);
View Full Code Here

Examples of org.apache.axiom.om.OMSourcedElement.detach()

        XMLStreamReader reader = child.getXMLStreamReader();
        reader.next();
        assertTrue("OMSourcedElement is not expanded.  This is unexpected",
                   child.isExpanded());
       
        child.detach();
       
        // Reset the tree
        isds1 = new InputStreamDataSource(
            new ByteArrayInputStream(payload1.getBytes(encoding)),
            encoding);
View Full Code Here

Examples of org.apache.axiom.om.OMText.detach()

                        }
                    }
                } else if (sourceNodeList.get(0) instanceof OMElement) {
                    Object targetParent = targetText.getParent();
                    if (targetParent instanceof OMElement) {
                        targetText.detach();
                        ((OMElement)targetParent).addChild(sourceNodeList.get(0));
                    }
                }
            } else {
                synLog.error("Invalid Target object to be enrich.");
View Full Code Here

Examples of org.apache.axiom.om.impl.OMNodeEx.detach()

                // We don't need to detach and re-add it.
                return;
            }
        }
        if (child.getParent() != null) {
            child.detach();
        }
       
        child.setParent(container);

        if (container.getFirstOMChildIfAvailable() == null) {
View Full Code Here

Examples of org.apache.axiom.om.util.DetachableInputStream.detach()

            getProperty(Constants.DETACHABLE_INPUT_STREAM);
        if (is != null) {
            if (log.isDebugEnabled()) {
                log.debug("Detaching inbound input stream " + is);
            }
            is.detach();
        }
    }
}
View Full Code Here

Examples of org.apache.axiom.soap.SOAPBody.detach()

            SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
            SOAPBody soapBodyOne = omFactory.createSOAPBody(soapEnvelope);
            assertTrue(
                    "Programatically created SOAPBody should have done = true ",
                    soapBodyOne.isComplete());
            soapBodyOne.detach();
            SOAPBody soapBodyTwo = omFactory.createSOAPBody(soapEnvelope,
                    omBuilder);
            assertTrue(
                    "SOAPBody with a builder should start with done = false ",
                    !soapBodyTwo.isComplete());
View Full Code Here

Examples of org.apache.axiom.soap.SOAPEnvelope.detach()

    }

    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = getTestMessage(MESSAGE);
        OMDocument document = (OMDocument)envelope.getParent();
        envelope.detach();
        assertNull(envelope.getParent());
        assertNull(envelope.getPreviousOMSibling());
        assertNull(envelope.getNextOMSibling());
        assertNull(document.getOMDocumentElement());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.