You could the online Code Beautify at:
https://codebeautify.org/xml-to-java-converter#
Here is an example:
Here is my XML -->
-----------
Input
--------------
------------
Output
-----------
public class Codebeautify {
Employees EmployeesObject;
// Getter Methods
public Employees getEmployees() {
return EmployeesObject;
}
// Setter Methods
public void setEmployees(Employees employeesObject) {
this.EmployeesObject = employeesObject;
}
}
public class Employees {
Employee EmployeeObject;
// Getter Methods
public Employee getEmployee() {
return EmployeeObject;
}
// Setter Methods
public void setEmployee(Employee employeeObject) {
this.EmployeeObject = employeeObject;
}
}
public class Employee {
private String id;
private String Name;
private String job;
// Getter Methods
public String getId() {
return id;
}
public String getName() {
return Name;
}
public String getJob() {
return job;
}
// Setter Methods
public void setId(String id) {
this.id = id;
}
public void setName(String Name) {
this.Name = Name;
}
public void setJob(String job) {
this.job = job;
}
}
https://codebeautify.org/xml-to-java-converter#
Here is an example:
Here is my XML -->
-----------
Input
--------------
------------
Output
-----------
public class Codebeautify {
Employees EmployeesObject;
// Getter Methods
public Employees getEmployees() {
return EmployeesObject;
}
// Setter Methods
public void setEmployees(Employees employeesObject) {
this.EmployeesObject = employeesObject;
}
}
public class Employees {
Employee EmployeeObject;
// Getter Methods
public Employee getEmployee() {
return EmployeeObject;
}
// Setter Methods
public void setEmployee(Employee employeeObject) {
this.EmployeeObject = employeeObject;
}
}
public class Employee {
private String id;
private String Name;
private String job;
// Getter Methods
public String getId() {
return id;
}
public String getName() {
return Name;
}
public String getJob() {
return job;
}
// Setter Methods
public void setId(String id) {
this.id = id;
}
public void setName(String Name) {
this.Name = Name;
}
public void setJob(String job) {
this.job = job;
}
}
No comments:
Post a Comment