Package org.exist.util.serializer

Examples of org.exist.util.serializer.SAXSerializer.endDocument()


            }

            // close <collection>
            serializer.endElement( Namespaces.EXIST_NS, "collection", "collection" );
            serializer.endPrefixMapping( "" );
            serializer.endDocument();
            output.closeContents();
        }
        finally {

//            if( !current.getURI().equalsInternal( XmldbURI.ROOT_COLLECTION_URI ) ) {
View Full Code Here


            while(itSequence.hasNext()) {
               NodeValue next = (NodeValue)itSequence.nextItem();
               serializer.toSAX(next)
            }
           
            sax.endDocument();
            writer.close();
        } catch(SAXException saxe) {
            throw new HttpClientException("A problem occurred while serializing the node set: " + saxe.getMessage(), saxe);
        } catch(IOException ioe) {
            throw new HttpClientException("A problem occurred while serializing the node set: " + ioe.getMessage(), ioe);
View Full Code Here

            {
             final NodeValue next = (NodeValue)siNode.nextItem();
               serializer.toSAX(next)
            }
           
            sax.endDocument();
            writer.close();
        }
        catch(final SAXException e)
        {
            throw new XPathException(this, "A problem occurred while serializing the node set: " + e.getMessage(), e);
View Full Code Here

                try {
                    final StringWriter writer = new StringWriter();
                    final SAXSerializer serializer = new SAXSerializer(writer, null);
                    serializer.startDocument();
                    serialize(instance, serializer);
                    serializer.endDocument();
                    final String data = writer.toString();
                    if (data == null || data.length() == 0) {
                        return null;
                    }
                    return parse(new ByteArrayInputStream(data.getBytes(UTF_8)));
View Full Code Here

        final SAXSerializer serializer = new SAXSerializer(writer, null);
       
        try {
            serializer.startDocument();
            serialize(instance, serializer);
            serializer.endDocument();
           
        } catch (final SAXException saxe) {
            throw new ConfigurationException(saxe.getMessage(), saxe);
        }
       
View Full Code Here

            }

            serializer.endElement(Namespaces.EXIST_NS, "collection", "exist:collection");
            serializer.endElement(Namespaces.EXIST_NS, "result", "exist:result");

            serializer.endDocument();

            writer.flush();
            writer.close();

        } catch (final SAXException e) {
View Full Code Here

//            while(node.hasNext()) {
//                NodeValue next = (NodeValue)node.nextItem();
//                serializer.toSAX(next);
//            }
           
            sax.endDocument();
            writer.close();
           
        } catch(final Exception e) {
            final String txt = "A problem occurred while serializing the node set";
            LOG.debug(txt+".", e);
View Full Code Here

          handler.characters(value, 0, value.length);
        }
      }
      handler.endElement(Namespaces.EXIST_NS, "result", "exist:result");
      handler.endPrefixMapping("exist");
      handler.endDocument();
    } catch (final EXistException e) {
      throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "serialization error", e);
    } catch (final SAXException e) {
      throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "serialization error", e);
    } finally {
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.