Class XmlFragmentMarshaller

java.lang.Object
google.registry.xml.XmlFragmentMarshaller

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

    • marshal

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

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

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