Examples of XMLRoot


Examples of org.eclipse.persistence.oxm.XMLRoot

      Object iterator = containerPolicy.iteratorFor(value);
      while(containerPolicy.hasNext(iterator)) {
        Object next = containerPolicy.next(iterator, null);
        if(next instanceof JAXBElement) {
          JAXBElement element = (JAXBElement)next;
          XMLRoot root = new XMLRoot();
          root.setLocalName(element.getName().getLocalPart());
          root.setNamespaceURI(element.getName().getNamespaceURI());
          root.setObject(element.getValue());
          containerPolicy.addInto(root, results, null);
        } else {
          containerPolicy.addInto(next, results, null);
        }
      }
      value = results;
    } else {
      if(value instanceof JAXBElement) {
        JAXBElement element = (JAXBElement)value;
        XMLRoot root = new XMLRoot();
        root.setLocalName(element.getName().getLocalPart());
        root.setNamespaceURI(element.getName().getNamespaceURI());
        root.setObject(element.getValue());
        value = root;
      }
    }
    return value;
  }
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.