metatada generating: moving from dom to xmlwriter
in progress