Package org.eclipse.persistence.platform.xml

Examples of org.eclipse.persistence.platform.xml.XMLTransformer


              } else {
                  return unmarshal(streamSource.getSystemId());
              }
          } else {
            XMLUnmarshallerHandler handler = this.xmlUnmarshaller.getUnmarshallerHandler();
            XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
            SAXResult result = new SAXResult(handler);
            transformer.transform(source, result);
            return handler.getResult();         
          }
      }finally {
          xmlUnmarshaller.getStringBuffer().reset();
        }
View Full Code Here


                    return unmarshal(new InputSource(streamSource.getSystemId()), clazz, getXMLReader(clazz));
              }               
            }
        } else {
          DOMResult result = new DOMResult();
          XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
          transformer.transform(source, result);
          return unmarshal(result.getNode(), clazz);
         
        }
    }
View Full Code Here

            } else {
                return unmarshal(streamSource.getSystemId());
            }
        } else {
          XMLUnmarshallerHandler handler = this.xmlUnmarshaller.getUnmarshallerHandler();
          XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
          SAXResult result = new SAXResult(handler);
          transformer.transform(source, result);
          return handler.getResult();
        }
    }
View Full Code Here

            } else {
                return unmarshal(streamSource.getSystemId(), clazz);
            }
        } else {
          DOMResult result = new DOMResult();
          XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
          transformer.transform(source, result);
          return unmarshal(result.getNode(), clazz);
         
        }
    }
View Full Code Here

        Node n = this.marshaller.objectToXML(obj, node, desc, domRecord, isXMLRoot, this.getDocumentPreservationPolicy());

        validateNode(n);
       
        DOMResult result = new DOMResult(node);
        XMLTransformer transformer = marshaller.getTransformer();
        if (isXMLRoot) {
            String oldEncoding = transformer.getEncoding();
            String oldVersion = transformer.getVersion();
            if (((Root) obj).getEncoding() != null) {
                transformer.setEncoding(((Root) obj).getEncoding());
            }
            if (((Root) obj).getXMLVersion() != null) {
                transformer.setVersion(((Root) obj).getXMLVersion());
            }
            transformer.transform(n, result);
            if(oldEncoding != null){
                transformer.setEncoding(oldEncoding);
            }
            if(oldVersion != null){
                transformer.setVersion(oldVersion);
            }
        } else {
            transformer.transform(n, result);
          
        }
    }
View Full Code Here

            } else {
                return unmarshal(streamSource.getSystemId());
            }
        } else {
          XMLUnmarshallerHandler handler = this.xmlUnmarshaller.getUnmarshallerHandler();
          XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
          SAXResult result = new SAXResult(handler);
          transformer.transform(source, result);
          return handler.getResult();
        }
    }
View Full Code Here

            } else {
                return unmarshal(streamSource.getSystemId(), clazz);
            }
        } else {
          DOMResult result = new DOMResult();
          XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
          transformer.transform(source, result);
          return unmarshal(result.getNode(), clazz);
         
        }
    }
View Full Code Here

    /**
     * Write the XML string representation of the DOM.
     */
    public void transformToWriter(Writer writer) {
        XMLTransformer xmlTransformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
        xmlTransformer.transform(this.getDOM(), writer);
    }
View Full Code Here

            } else {
                return unmarshal(streamSource.getSystemId());
            }
        } else {
          XMLUnmarshallerHandler handler = this.xmlUnmarshaller.getUnmarshallerHandler();
          XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
          SAXResult result = new SAXResult(handler);
          transformer.transform(source, result);
          return handler.getResult();
        }
    }
View Full Code Here

            } else {
                return unmarshal(streamSource.getSystemId(), clazz);
            }
        } else {
          DOMResult result = new DOMResult();
          XMLTransformer transformer = XMLPlatformFactory.getInstance().getXMLPlatform().newXMLTransformer();
          transformer.transform(source, result);
          return unmarshal(result.getNode(), clazz);
         
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.platform.xml.XMLTransformer

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.