Package org.exist.storage.serializers

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


                    serializer.reset();
                   
                    // Preserve doctype
                    serializer.setProperty(EXistOutputKeys.OUTPUT_DOCTYPE, "yes");
                    final Writer w = new OutputStreamWriter(os,"UTF-8");
                    serializer.serialize(resource,w);
                    w.close();
                   
                } else {
                    broker.readBinaryResource((BinaryDocument) resource, os);
                }
View Full Code Here


            DocumentImpl doc = test.getDocument(broker, XmldbURI.createInternal("document.xml"));
            assertNotNull(doc);
           
            Serializer serializer = broker.getSerializer();
            serializer.reset();
            String xml = serializer.serialize(doc);
            System.out.println(xml);
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        } finally {
View Full Code Here

    }
    private String serializer(DBBroker broker, DocumentImpl document) throws SAXException {
    Serializer serializer = broker.getSerializer();
    serializer.setUser(broker.getSubject());
    serializer.setProperties(contentsOutputProps);
    return serializer.serialize(document);
  }

  //@BeforeClass
    public static void startDB() {
        DBBroker broker = null;
View Full Code Here

            final Serializer serializer = broker.getSerializer();
            serializer.reset();

            final Item item = result.itemAt(0);
            if (Type.subTypeOf(item.getType(), Type.NODE)) {
                LOG.trace(serializer.serialize((NodeValue) item));
            }
        }
    }

    @Override
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.