Class XmlContext


  • public class XmlContext
    extends java.lang.Object
    Context for XML unmarshalling to target object.
    Author:
    Daniel Sagenschneider
    • Constructor Detail

      • XmlContext

        public XmlContext​(java.lang.Class<?> targetObjectType,
                          java.lang.String rootNode,
                          XmlMappingMetaData[] configuration,
                          TranslatorRegistry translatorRegistry,
                          ReferencedXmlMappingRegistry referencedRegistry)
                   throws XmlMarshallException
        Constructor that should be used by external classes to instantiate this.
        Parameters:
        targetObjectType - Class of the target object.
        rootNode - Name of root node to begin XML unmarshalling.
        configuration - Configuration of this XmlContext.
        translatorRegistry - Registry of translators for value translation.
        referencedRegistry - Registry of referenced XmlMapping instances.
        Throws:
        XmlMarshallException - Should this XmlContext fail to be configured.
    • Method Detail

      • getElementXmlMapping

        public ElementXmlMapping getElementXmlMapping​(java.lang.String elementName)
        Obtains the ElementXmlMapping for the element.
        Parameters:
        elementName - Element name.
        Returns:
        ElementXmlMapping for element or null if there is no mapping.