Class XmlContext

  • public class XmlContext
    extends java.lang.Object
    Context for XML unmarshalling to target object.
    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.
        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.
        XmlMarshallException - Should this XmlContext fail to be configured.
    • Method Detail

      • getElementXmlMapping

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