Parse XML and generate HTML