I just analyzed my design work for the past day. It turns out that I implemented simple two level hierarchy in strings , rather than XML , which is strange for my liking. I had to implement this: A , where A has children a 1 , a 2 , ... , a n , B , where...