Package com.xmlit.project.engine.marshal

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


      throws UnmarshalException {
    HttpServletRequest request = this.getThreadLocalRequest();   
    sendMail(message, "unmarshel:"+request.getRemoteAddr() + " " + request.getRemoteUser());
    message = message.replaceAll("\r\n", "\n");
    message = message.replaceAll("\n", "\r\n");
    message = Utils.dom2String(new UnmarshalImpl().unmarshal(message, struct));
    if (message.trim().indexOf('\n') == -1) {
      throw new RuntimeException("Unmarshal Failed");
    }

    return message;
View Full Code Here


    DOMImplementationLS impl =
        (DOMImplementationLS)registry.getDOMImplementation("LS");
 
    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++)
View Full Code Here

    DOMImplementationLS impl =
        (DOMImplementationLS)registry.getDOMImplementation("LS");
   
    long time = System.currentTimeMillis();
    new UnmarshalImpl().unmarshal(msg, root);
    System.out.println("time="+(System.currentTimeMillis()-time));


    LSSerializer writer = impl.createLSSerializer();
    writer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE);

    String str = writer.writeToString(new UnmarshalImpl().unmarshal(msg, root));
   
    System.out.println(str);
   
    /*String reg = root.calcRegex(new CalcContext());
    System.out.println("---->"+reg);
View Full Code Here


    LSSerializer writer = impl.createLSSerializer();
    writer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE);

    String str = writer.writeToString(new UnmarshalImpl().unmarshal("aaa/bbb", root));
   
    System.out.println(str);
   
    /*String reg = root.calcRegex(new CalcContext());
    System.out.println("---->"+reg);
View Full Code Here

      writer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE);
      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");
View Full Code Here

TOP

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

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.