added foreach loop to iterate child nodes of xml document element. Generates all paragraphs for html.