Package org.w3c.dom

Examples of org.w3c.dom.Document.createDocumentFragment()


        if (this.getLogger().isDebugEnabled()) {
            this.getLogger().debug("layout base profile loaded");
        }
        // now create the base profile containing the above profiles
        profileDoc = DOMUtil.createDocument();
        profile = profileDoc.createDocumentFragment();
        profileRoot = profileDoc.createElementNS(null, "profile");
        profile.appendChild(profileRoot);
        profileRoot.appendChild(profileDoc.importNode(DOMUtil.selectSingleNode(layoutFragment,
                                                                  "layout-profile", this.xpathProcessor), true));
        profileRoot.appendChild(profileDoc.importNode(DOMUtil.selectSingleNode(copletsFragment,
View Full Code Here


        if (path.startsWith("/")) path = path.substring(1);
        NodeList list = null;

        if (path == null || path.equals("")) {
            Document doc = DOMUtil.createDocument();
            result = doc.createDocumentFragment();
            this.getLayoutDOM();
            if (this.layoutDOM != null) {
                result.appendChild(doc.importNode(this.layoutDOM.getDocumentElement(), true));
            }
            if (this.configurationDOM != null) {
View Full Code Here

            }
        }

        if (list != null && list.getLength() > 0) {
            Document doc = DOMUtil.createDocument();
            result = doc.createDocumentFragment();

            for(int i = 0; i < list.getLength(); i++) {

                // the found node is either an attribute or an element
                if (list.item(i).getNodeType() == Node.ATTRIBUTE_NODE) {
View Full Code Here

    while (reader.nextTag() != XMLStreamConstants.END_ELEMENT) {
      QName hn = reader.getName();
      FragmentStreamReader rh = new FragmentStreamReader(reader);
      Document doc = (Document) marshaler.getSourceTransformer().toDOMNode(
          new StaxSource(rh));
      DocumentFragment df = doc.createDocumentFragment();
      df.appendChild(doc.getDocumentElement());
      message.addHeader(hn, df);
    }
  }
View Full Code Here

        return DOMUtil.getElementText(el);
    }
   
    protected DocumentFragment createHeader(QName name, String value) throws Exception {
        Document doc = new SourceTransformer().createDocument();
        DocumentFragment df = doc.createDocumentFragment();
        Element el = doc.createElementNS(name.getNamespaceURI(), name.getPrefix() + ":" + name.getLocalPart());
        el.appendChild(doc.createTextNode(value));
        df.appendChild(el);
        return df;
    }
View Full Code Here

        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document doc = db.newDocument();
            DocumentFragment fragment = doc.createDocumentFragment();
            Element epr = doc.createElementNS(JBI_NAMESPACE, "jbi:end-point-reference");
            epr.setAttributeNS(XMLNS_NAMESPACE,"xmlns:sns", endpoint.getServiceName().getNamespaceURI());
            epr.setAttributeNS(JBI_NAMESPACE, "jbi:service-name", "sns:" + endpoint.getServiceName().getLocalPart());
            epr.setAttributeNS(JBI_NAMESPACE, "jbi:end-point-name", endpoint.getEndpointName());
            fragment.appendChild(epr);
View Full Code Here

    public DocumentFragment getAsReference(QName operationName) {
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            Document doc = dbf.newDocumentBuilder().newDocument();
            DocumentFragment df = doc.createDocumentFragment();
            Element e = doc.createElementNS(MyResolvedEndpoint.EPR_URI, MyResolvedEndpoint.EPR_NAME);
            Text t = doc.createTextNode(endpoint.getService() + "#" + endpoint.getEndpoint());
            e.appendChild(t);
            df.appendChild(e);
            return df;
View Full Code Here

    public DocumentFragment getAsReference(QName operationName) {
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            Document doc = dbf.newDocumentBuilder().newDocument();
            DocumentFragment df = doc.createDocumentFragment();
            Element e = doc.createElementNS(HttpResolvedEndpoint.EPR_URI, HttpResolvedEndpoint.EPR_NAME);
            Text t = doc.createTextNode(endpoint.getLocationURI());
            e.appendChild(t);
            df.appendChild(e);
            return df;
View Full Code Here

    public DocumentFragment getAsReference(QName operationName) {
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            Document doc = dbf.newDocumentBuilder().newDocument();
            DocumentFragment df = doc.createDocumentFragment();
            Element e = doc.createElementNS(JmsResolvedEndpoint.EPR_URI, JmsResolvedEndpoint.EPR_NAME);
            Text t = doc.createTextNode(endpoint.getService() + "#" + endpoint.getEndpoint());
            e.appendChild(t);
            df.appendChild(e);
            return df;
View Full Code Here

        if (path.startsWith("/") == true) path = path.substring(1);
        NodeList list = null;

        if (path == null || path.equals("") == true) {
            Document doc = DOMUtil.createDocument();
            result = doc.createDocumentFragment();
            this.getLayoutDOM();
            if (this.layoutDOM != null) {
                result.appendChild(doc.importNode(this.layoutDOM.getDocumentElement(), true));
            }
            if (this.configurationDOM != null) {
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.