Add xml parsing with loop to parse all documents