Class XmlFragmentMarshaller


  • @NotThreadSafe
    public final class XmlFragmentMarshaller
    extends java.lang.Object
    JAXB marshaller for building pieces of XML documents in a single thread.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String marshal​(javax.xml.bind.JAXBElement<?> element)
      Turns an individual JAXB element into an XML fragment string.
      java.lang.String marshal​(javax.xml.bind.JAXBElement<?> element, ValidationMode validationMode)
      Turns an individual JAXB element into an XML fragment string using the given validation mode.
      java.lang.String marshalLenient​(javax.xml.bind.JAXBElement<?> element)
      Turns an individual JAXB element into an XML fragment string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • marshal

        public java.lang.String marshal​(javax.xml.bind.JAXBElement<?> element)
                                 throws javax.xml.bind.MarshalException
        Turns an individual JAXB element into an XML fragment string.
        Throws:
        javax.xml.bind.MarshalException - if schema validation failed
      • marshalLenient

        public java.lang.String marshalLenient​(javax.xml.bind.JAXBElement<?> element)
        Turns an individual JAXB element into an XML fragment string.
      • marshal

        public java.lang.String marshal​(javax.xml.bind.JAXBElement<?> element,
                                        ValidationMode validationMode)
                                 throws javax.xml.bind.MarshalException
        Turns an individual JAXB element into an XML fragment string using the given validation mode.
        Throws:
        javax.xml.bind.MarshalException - if schema validation failed