Examples of ClassRoom


Examples of com.fengjing.framework.jaxb.model.ClassRoom

  @Test
  public void xml2classroom() throws JAXBException{
    String str="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><classRoom classroomid=\"classroom\" classroomname=\"�������\"><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student><student><age>18</age><stuaddress>��������</stuaddress><stuname>admin</stuname></student></classRoom>";
    JAXBContext context=JAXBContext.newInstance(ClassRoom.class);
    Unmarshaller unmarshaller = context.createUnmarshaller();
    ClassRoom room = (ClassRoom) unmarshaller.unmarshal(new StringReader(str));
    System.out.println(room);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.