public static < T > T xmlNodeToObject ( final Node node , final Class < T > valueType , final JAXBContext jaxbContext ) throws JAXBException { if ( node == null ) { return null ; } Validate . notNull ( valueType , "valueType must not be null" ) ; if ( jaxbContext == null ) { return valueType . cast ( getJaxbContext ( valueType ) . createUnmarshaller ( ) . unmarshal ( node ) ) ; } return valueType . cast ( jaxbContext . createUnmarshaller ( ) . unmarshal ( node ) ) ; }
Transforms a XML node into an object .