Examples of toSAX()


Examples of org.apache.excalibur.xmlizer.XMLizer.toSAX()

            String mimeType = source.getMimeType();
            if ( null == mimeType) mimeType = mimeTypeHint;
            XMLizer xmlizer = null;
            try {
                xmlizer = (XMLizer) manager.lookup( XMLizer.ROLE);
                xmlizer.toSAX( source.getInputStream(),
                               mimeType,
                               source.getURI(),
                               handler );
            } catch (SourceException se) {
                throw SourceUtil.handle(se);
View Full Code Here

Examples of org.apache.xmlgraphics.xmp.Metadata.toSAX()

    public void handleExtensionObject(Object extension) throws IFException {
        if (extension instanceof Metadata) {
            Metadata meta = (Metadata)extension;
            try {
                handler.startElement("metadata");
                meta.toSAX(this.handler);
                handler.endElement("metadata");
            } catch (SAXException e) {
                throw new IFException("SAX error while handling extension object", e);
            }
        } else {
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.WingMergeableElement.toSAX()

            if (stack.size() > 0)
            {
                WingMergeableElement poped = stack.pop();
                if (poped != null)
                {
                  poped.toSAX(contentHandler, lexicalHandler, namespaces);
                  poped.dispose();
                }
            }

            // Send the event on unmodified
View Full Code Here

Examples of org.exist.storage.serializers.Serializer.toSAX()

                //Nothing to do ?
            } catch (final SAXNotSupportedException e) {
                //Nothing to do ?
            }
            try {
                serializer.toSAX(((ReferenceNode)node).getReference());
            } catch (final SAXException e) {
                throw new TransformerException(e.getMessage(), e);
            } finally {
                SerializerPool.getInstance().returnObject(handler);
            }
View Full Code Here

Examples of org.exist.storage.statistics.IndexStatistics.toSAX()

        }

        final SAXAdapter adapter = new SAXAdapter(context);
        try {
            adapter.startDocument();
            index.toSAX(adapter);
            adapter.endDocument();
        } catch (final SAXException e) {
            throw new XPathException(this, "Error caught while retrieving statistics: " + e.getMessage(), e);
        }
        final DocumentImpl doc = (DocumentImpl) adapter.getDocument();
View Full Code Here

Examples of org.exist.xquery.value.Item.toSAX()

                }

                SAXSerializer sax = new SAXSerializer( osw, new Properties() );

                try {
                    payload.toSAX( context.getBroker(), sax, new Properties() );
                    osw.flush();
                    osw.close();
                }
                catch( Exception e ) {
                    throw( new XPathException( this, e.getMessage() ) );
View Full Code Here

Examples of org.exist.xquery.value.NodeValue.toSAX()

                try{
                  NodeValue content = ModuleUtils.streamToXML(context, new ByteArrayInputStream(baos.toByteArray()));
                  resource = target.createResource(name, "XMLResource");
                  ContentHandler handler = ((XMLResource)resource).setContentAsSAX();
                  handler.startDocument();
                  content.toSAX(context.getBroker(), handler, null);
                  handler.endDocument();
                } catch(SAXException e){
                  resource = target.createResource(name, "BinaryResource");
                  resource.setContent(baos.toByteArray());
                    }
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.