I have XML file and want make java classes.
I want something like this
@XmlRootElement
public class Customer {
String name;
int age;
int id;
public String getName() {
return name;
}
}
But from bigger XML, some elements got duplicate child elements and some not. Create it manually is very complicated, so I tried some online tools like Pojo, but it makes class for every element (root element got 10 same child elements) so it makes 100+ class files, thats not the right solution in my opinion. I looked to JAXB, but I didnt find anything that is just creating class files, found only how to fill these classes. Tried convert XML to XSD and then to java classes, but didnt find anything what make java classes from XSD.
Thanks for every response, I tried many ways, but none was right.