Dissecting out the XML element hierarchy with and without additions into valid XML

Scripts