parsing TEI data before visualization