Java XML JAXB Unmarshaller unmarshal(org.w3c.dom.Element elem, Class c)

Here you can find the source of unmarshal(org.w3c.dom.Element elem, Class c)

Description

unmarshal

License

Open Source License

Declaration

public static Object unmarshal(org.w3c.dom.Element elem, Class<?> c) throws JAXBException 

Method Source Code

//package com.java2s;
//## The MIT License

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

import javax.xml.bind.Unmarshaller;

public class Main {
    public static Object unmarshal(org.w3c.dom.Element elem, Class<?> c) throws JAXBException {
        Object result = null;//from ww w  .  j a v  a2s  .  c  om

        JAXBContext jc = JAXBContext.newInstance(c);
        Unmarshaller um = jc.createUnmarshaller();
        result = um.unmarshal(elem);

        return result;
    }
}

Related

  1. unmarshal(InputStream inputStream, Class type)
  2. unmarshal(InputStream is, Class clazz)
  3. unmarshal(InputStream stream, Class clazz)
  4. unmarshal(JAXBContext context, Class clazz, String source)
  5. unmarshal(JAXBContext jaxbContext, XMLStreamReader xmlStreamReader)
  6. unmarshal(org.w3c.dom.Element elem, Class c)
  7. unmarshal(String b, Class implClass, Class... bc)
  8. unmarshal(String content, Class clasz)
  9. unMarshal(String contextPath, InputStream xmlStream)