主要使用到的Java类有:javax.xml.bind.JAXBContext,javax.xml.bind.Marshaller(编排) 代码主要展示如下: public class Student { private int id; private String name; private int age; public int getId() { return id; } public void setId(int id) { this.id = id; } public String g
1.先定义一个Java对象Person: public class Person { String name; int age; int number; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age =