Java XML JAXB String to Object fromStringToObject(String xmlString, Class xmlObjClass)

Here you can find the source of fromStringToObject(String xmlString, Class xmlObjClass)

Description

from String To Object

License

Apache License

Declaration

public static <T> T fromStringToObject(String xmlString,
            Class<T> xmlObjClass) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.xml.bind.JAXB;
import java.io.StringReader;

public class Main {
    public static <T> T fromStringToObject(String xmlString,
            Class<T> xmlObjClass) {
        return JAXB.unmarshal(new StringReader(xmlString), xmlObjClass);
    }/*from  www  . j  a v a  2s  .c  om*/
}

Related

  1. converyToJavaBean(String xml, Class c)
  2. converyToJavaBean(String xml, Class clazz)
  3. createObject(String xml, Object type)
  4. fromFile(Class jaxbClass, String fileName)
  5. fromStream(Class jaxbClass, InputStream is)
  6. fromXml(@SuppressWarnings("rawtypes") Class clazz, String stringXml)
  7. fromXML(Class clazz, InputStream is)
  8. fromXml(Class tClass, InputStream inputStream)
  9. fromXml(File xmlPath, Class type)