Parsing XHTML and gathering tags