Package com.xmlit.project.engine.marshal

Examples of com.xmlit.project.engine.marshal.MarshalImpl


    DocumentBuilder db;
    try {
      db = dbf.newDocumentBuilder();
      Document doc = db.parse(new ByteArrayInputStream(xml
          .getBytes("UTF-8")));
      return new MarshalImpl().marshal(doc, struct);

    } catch (Exception e) {
      throw new RuntimeException(xml, e);
    }
View Full Code Here


    LSSerializer writer = impl.createLSSerializer();
    writer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE);
    Document doc = new UnmarshalImpl().unmarshal(msg, root);
    String str = writer.writeToString(doc);
    System.out.println(str);
    System.out.println(new MarshalImpl().marshal(doc, root));
/*  long time = System.currentTimeMillis();
    for (int i = 0;i < 10000;i++)
      new UnmarshalImpl().unmarshal(msg, root);
    System.out.println("time="+(System.currentTimeMillis() - time));

View Full Code Here

      try {
        String message = file2String(messages[i]);
        Document doc;
        try {
          doc = new UnmarshalImpl().unmarshal(message, root);
          String msg = new MarshalImpl().marshal(doc, root);
          System.out.println("dif=" + (message.equals(msg)));
          if (!message.equals(msg)) {
            System.out.println(writer.writeToString(doc));
            System.out.println("++++++++++++BEFORE");
            System.out.println(message);
View Full Code Here

TOP

Related Classes of com.xmlit.project.engine.marshal.MarshalImpl

Copyright © 2018 www.massapicom. 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.