Better method for parsing xml.