working export of xml files, still need to add attributes.