Persist jcr/xml in hierarchy structure, corrected codes as suggested.