Package org.apache.xindice.xml.dom

Examples of org.apache.xindice.xml.dom.DocumentImpl.createTextNode()


            DocumentImpl doc = new DocumentImpl();
            Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:"+NodeSource.SOURCE_MODIFIED);
            elem.setAttribute(NodeImpl.XMLNS_PREFIX+":src", NodeSource.SOURCE_NS);
            doc.appendChild(elem);
            Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
            elem.appendChild(count);
           
            return new NodeListSet(doc.getChildNodes());
         }
         catch ( Exception e ) {
View Full Code Here


   
                root.appendChild(doc.importNode(n, true));
            }
            else if (element instanceof Boolean || element instanceof Double)
            {
                root.appendChild(doc.createTextNode(element.toString()));
            }
            else if (element instanceof String)
            {
                root.appendChild(doc.createTextNode((String) element));
            }
View Full Code Here

            {
                root.appendChild(doc.createTextNode(element.toString()));
            }
            else if (element instanceof String)
            {
                root.appendChild(doc.createTextNode((String) element));
            }
            else
            {
                throw new XindiceRuntimeException("Unknown result type (" + element.getClass().getName() + ") in nodeset");
            }
View Full Code Here

                DocumentImpl doc = new DocumentImpl();
                Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:" + NodeSource.SOURCE_MODIFIED);
                elem.setAttribute(NodeImpl.XMLNS_PREFIX + ":src", NodeSource.SOURCE_NS);
                doc.appendChild(elem);
                Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
                elem.appendChild(count);

                return new NodeListSet(doc.getChildNodes());
            } catch (Exception e) {
                if (e instanceof QueryException) {
View Full Code Here

                    ((DBNode) n).expandSource();
                }

                root.appendChild(doc.importNode(n, true));
            } else if (element instanceof Boolean || element instanceof Double) {
                root.appendChild(doc.createTextNode(element.toString()));
            } else if (element instanceof String) {
                root.appendChild(doc.createTextNode((String) element));
            } else {
                throw new XindiceRuntimeException("Unknown result type (" + element.getClass().getName() + ") in nodeset");
            }
View Full Code Here

                root.appendChild(doc.importNode(n, true));
            } else if (element instanceof Boolean || element instanceof Double) {
                root.appendChild(doc.createTextNode(element.toString()));
            } else if (element instanceof String) {
                root.appendChild(doc.createTextNode((String) element));
            } else {
                throw new XindiceRuntimeException("Unknown result type (" + element.getClass().getName() + ") in nodeset");
            }

            count++;
View Full Code Here

                DocumentImpl doc = new DocumentImpl();
                Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:" + NodeSource.SOURCE_MODIFIED);
                elem.setAttribute(NodeImpl.XMLNS_PREFIX + ":src", NodeSource.SOURCE_NS);
                doc.appendChild(elem);
                Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
                elem.appendChild(count);

                return new NodeListSet(doc.getChildNodes());
            } catch (Exception e) {
                if (e instanceof QueryException) {
View Full Code Here

        if (custom != null && custom.getDocumentElement() != null) {
            Element customEle = custom.getDocumentElement();
            if (!customEle.hasChildNodes()) {
                Document helper = new DocumentImpl();
                /*customEle = (Element) */customEle
                    .appendChild(helper.createTextNode("\n\n"));
            }
            TextWriter.write(custom.getDocumentElement(), output);
        }
        output.println(META_CUSTOM_UPDATE_FORM_END);
        printEndSingleTableBox(output);
View Full Code Here

        output.println(META_CUSTOM_UPDATE_FORM_START);
        if (custom != null && custom.getDocumentElement() != null) {
            Element customEle = custom.getDocumentElement();
            if (!customEle.hasChildNodes()) {
                Document helper = new DocumentImpl();
                customEle.appendChild(helper.createTextNode("\n\n"));
            }
            TextWriter.write(custom.getDocumentElement(), output);
        }
        output.println(META_CUSTOM_UPDATE_FORM_END);
        printEndSingleTableBox(output);
View Full Code Here

                DocumentImpl doc = new DocumentImpl();
                Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:" + NodeSource.SOURCE_MODIFIED);
                elem.setAttribute(NodeImpl.XMLNS_PREFIX + ":src", NodeSource.SOURCE_NS);
                doc.appendChild(elem);
                Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
                elem.appendChild(count);

                return new NodeListSet(doc.getChildNodes());
            } catch (Exception e) {
                if (e instanceof QueryException) {
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.