XmlSerializer extends org.sirix.service.AbstractSerializer<XmlNodeReadOnlyTrx, XmlNodeTrx> { public static XmlSerializerBuilder newBuilder(final XmlResourceManager resMgr, final OutputStream stream, final int... revisions) { return new XmlSerializerBuilder(resMgr, stream, revisions); } private  XmlSerializer(final XmlResourceManager resourceMgr, final @Nonnegative long nodeKey,
      final XmlSerializerBuilder builder, final boolean initialIndent, final @Nonnegative int revision,
      final int... revsions); static void main(final String... args); static XmlSerializerBuilder newBuilder(final XmlResourceManager resMgr, final OutputStream stream,
      final int... revisions); static XmlSerializerBuilder newBuilder(final XmlResourceManager resMgr, final @Nonnegative long nodeKey,
      final OutputStream stream, final XmlSerializerProperties properties, final int... revisions);  }
@Test public void testRestSerializer() throws Exception { final var database = XmlTestHelper.getDatabase(PATHS.PATH1.getFile()); try (final XmlResourceManager manager = database.openResourceManager(XmlTestHelper.RESOURCE); final XmlNodeTrx wtx = manager.beginNodeTrx(); final ByteArrayOutputStream out = new ByteArrayOutputStream()) { XmlDocumentCreator.create(wtx); wtx.commit(); wtx.close(); final XmlSerializer serializer = XmlSerializer.newBuilder(manager, out) .emitRESTful() .emitRESTSequence() .emitIDs() .emitXMLDeclaration() .build(); serializer.call(); assertEquals(XmlDocumentCreator.REST, out.toString(Constants.DEFAULT_ENCODING.toString())); assertEquals(XmlDocumentCreator.REST, out.toString(Constants.DEFAULT_ENCODING.toString())); } }