I have a xml file like this:
<passwords>
<use>
    <title>LoL</title>
    <username>hallo</username>
    <password>asdasd</password>
    <note>asdasdasdasd</note>
</use>
<E-Mail>
    <use>
        <title>GMail</title>
        <username>hallo</username>
        <password>asdasd</password>
        <note>asdasdasdasd</note>
    </use>
    <Webmail>
        <use>
            <title>Yahoo</title>
            <username>hallo</username>
            <password>asdasd</password>
            <note>asdasdasdasd</note>
        </use>
    </Webmail>
</E-Mail>
And a class for the categories
public class Category {
    private ArrayList<Usage> usages;
    private ArrayList<Category> categories; 
    private String name;
    public Category(String name){
        this.name = name;
        usages = new ArrayList<>();
        categories = new ArrayList<>();
    }
    public void addUsage(Usage usage){
        usages.add(usage);
    }
    public void addCategory(Category category){
       categories.add(category);
    }
}
and the use
public class Usage {
private String title;
private String username;
private String password;
private String notes;
public void setTitle(String title) {
    this.title = title;
}
public void setUsername(String username) {
    this.username = username;
}
public void setPassword(String password) {
    this.password = password;
}
public void setNotes(String notes) {
    this.notes = notes;
}
public String getUsername() {
    return username;
}
public String getPassword() {
    return password;
}
public String getNotes() {
    return notes;
}
public String getTitle(){
    return title;
}
public String toString(){
    return "[[" + this.title + "][" + this.username + "][" + this.password + "][" + this.notes + "]]";
}
}
I want to get 1 category object with the other categories and usages in the arraylist but I can't figure out how to analyse it with the standard parsers.
I know how to do it with only one category and no sub-categories.