added tag and attribute reading