Using xml to keep the hierarchy