Parse xml to composite pattern