Class W3CTraceDomHandler

java.lang.Object
jakarta.xml.bind.annotation.W3CDomHandler
org.jvnet.basicjaxb.dom.W3CTraceDomHandler
All Implemented Interfaces:
jakarta.xml.bind.annotation.DomHandler<Element,DOMResult>

public class W3CTraceDomHandler extends jakarta.xml.bind.annotation.W3CDomHandler
An extension of W3CDomHandler to trace handler events: create a new DOMResult holder, access the Element instance or marshal the instance into a Source to regenerate the XML sub-tree.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createUnmarshaller(jakarta.xml.bind.ValidationEventHandler errorHandler)
    Create a new DOMResult instance for the XML Binding provider to transform a portion of the XML into the instance.
    getElement(DOMResult domResult)
    Once a portion of the XML is transformed to the DOMResult instance, this method is called by the XML Binding provider to obtain the unmarshalled Element representation.
    static org.slf4j.Logger
     
    marshal(Element element, jakarta.xml.bind.ValidationEventHandler errorHandler)
    This method is called when a the XML Binding provider needs to marshal the given Element instance to an XML representation.

    Methods inherited from class jakarta.xml.bind.annotation.W3CDomHandler

    getBuilder, setBuilder

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • W3CTraceDomHandler

      public W3CTraceDomHandler()
  • Method Details

    • getLogger

      public static org.slf4j.Logger getLogger()
    • createUnmarshaller

      public DOMResult createUnmarshaller(jakarta.xml.bind.ValidationEventHandler errorHandler)
      Create a new DOMResult instance for the XML Binding provider to transform a portion of the XML into the instance.
      Specified by:
      createUnmarshaller in interface jakarta.xml.bind.annotation.DomHandler<Element,DOMResult>
      Overrides:
      createUnmarshaller in class jakarta.xml.bind.annotation.W3CDomHandler
    • getElement

      public Element getElement(DOMResult domResult)
      Once a portion of the XML is transformed to the DOMResult instance, this method is called by the XML Binding provider to obtain the unmarshalled Element representation.
      Specified by:
      getElement in interface jakarta.xml.bind.annotation.DomHandler<Element,DOMResult>
      Overrides:
      getElement in class jakarta.xml.bind.annotation.W3CDomHandler
    • marshal

      public Source marshal(Element element, jakarta.xml.bind.ValidationEventHandler errorHandler)
      This method is called when a the XML Binding provider needs to marshal the given Element instance to an XML representation. Typically, the Source is a DOMSource that acts as a holder for a transformation source Document Object Model (DOM) tree.
      Specified by:
      marshal in interface jakarta.xml.bind.annotation.DomHandler<Element,DOMResult>
      Overrides:
      marshal in class jakarta.xml.bind.annotation.W3CDomHandler