wait for parse to finish before resolving load promise for xhtml files