Package org.apache.cocoon.xml.dom

Examples of org.apache.cocoon.xml.dom.DOMBuilder.endDocument()


            IncludeXMLConsumer filter = new IncludeXMLConsumer(builder, builder);
            parser.parse(input, filter);

            builder.endElement("", "sunShine", "sunShine");
            builder.endDocument();

            // Create Document Fragment, remove <root>
            final Document doc = builder.getDocument();
            frag = doc.createDocumentFragment();
            final Node root = doc.getDocumentElement().getFirstChild();
View Full Code Here


            if (input != null) input.recycle();
            input = null;
        }

        builder.endElement("", "sunShine", "sunShine");
        builder.endDocument();

        // Create Document Fragment
        final Document doc = builder.getDocument();
        recordedDocFrag = doc.createDocumentFragment();
        final Node root = doc.getDocumentElement();
View Full Code Here

            IncludeXMLConsumer filter = new IncludeXMLConsumer(builder, builder);
            input.toSAX(filter);

            builder.endElement("", "sunShine", "sunShine");
            builder.endDocument();

            // Create Document Fragment
            final Document doc = builder.getDocument();
            frag = doc.createDocumentFragment();
            final Node root = doc.getDocumentElement();
View Full Code Here

                Map portalLayouts = (Map)this.profile.get(Constants.PROFILE_PORTAL_LAYOUTS);
                Map sunletLayouts = (Map)this.profile.get(Constants.PROFILE_SUNLET_LAYOUTS);
                DOMBuilder builder = new DOMBuilder();
                builder.startDocument();
                SunSpot.streamLayoutProfile(builder, portalLayouts, sunletLayouts, this.mediaType);
                builder.endDocument();
                this.layoutDOM = builder.getDocument();
            } catch (SAXException local) {
                throw new ProcessingException("Unable to get sunSpot." + local, local);
            }
        }
View Full Code Here

                sunSpot.streamConfiguration(builder,
                                            this.portalURI,
                                            this.profileID,
                                            this.mediaType,
                                            contextID);
                builder.endDocument();
                this.configurationDOM = builder.getDocument();
            } catch (SAXException local) {
                throw new ProcessingException("Unable to get sunSpot." + local, local);
            }
        }
View Full Code Here

        this.sendEndPrefixMapping();

        DOMBuilder builder = (DOMBuilder)this.removeRecorder();
        builder.endElement("", "sunShine", "sunShine");
        builder.endDocument();

        // Create Document Fragment
        final Document doc = builder.getDocument();
        final DocumentFragment recordedDocFrag = doc.createDocumentFragment();
        final Node root = doc.getDocumentElement();
View Full Code Here

        widget.generateSaxFragment(domBuilder, locale);
       
        // End "fi:fragment" element and document
        domBuilder.endElement(FormsConstants.INSTANCE_NS, "fragment", FormsConstants.INSTANCE_PREFIX_COLON + "fragment");
        domBuilder.endPrefixMapping(FormsConstants.INSTANCE_PREFIX);
        domBuilder.endDocument();
       
        // Return the document
        return domBuilder.getDocument();
    }
   
View Full Code Here

            attrs.addAttribute(URI, NS_PREFIX, "xmlns:"+NS_PREFIX, "NMTOKEN", namespace);
            builder.startElement(namespace, name, D_PREFIX+name, attrs);
            builder.characters(value.toCharArray(), 0, value.length());
            builder.endElement(namespace, name, D_PREFIX+name);
            builder.endPrefixMapping(NS_PREFIX);
            builder.endDocument();
            Document doc = builder.getDocument();
            this.value = doc.getDocumentElement();
        } catch (SAXException se) {
            // do nothing
        }
View Full Code Here

            DOMStreamer stream = new DOMStreamer(builder);
            for (int i = 0; i<values.getLength(); i++) {
                stream.stream(values.item(i));
            }
            builder.endElement(namespace, name, name);
            builder.endDocument();
            Document doc = builder.getDocument();
            this.value = doc.getDocumentElement();
        } catch (SAXException se) {
            // do nothing
        }
View Full Code Here

                Map portalLayouts = (Map)this.profile.get(PortalConstants.PROFILE_PORTAL_LAYOUTS);
                Map copletLayouts = (Map)this.profile.get(PortalConstants.PROFILE_COPLET_LAYOUTS);
                DOMBuilder builder = new DOMBuilder();
                builder.startDocument();
                PortalManagerImpl.streamLayoutProfile(builder, portalLayouts, copletLayouts, this.mediaType);
                builder.endDocument();
                this.layoutDOM = builder.getDocument();
            } catch (SAXException local) {
                throw new ProcessingException("Unable to get portal." + local, local);
            }
        }
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.