我试图将xml文件解析为html。 所以我大气压与以下用Javascript解析XML
<script>
xmlDoc=new window.XMLHttpRequest();
xmlDoc.open("GET","test",false);
xmlDoc.send("");
</script>
去现在我想 “回声” 的要求,我怎么做,
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>
嗨,首先感谢,至今我无法得到它的工作。我仍然看到一个空白页面,并且responseText仍然是“”任何想法? – 2012-04-19 13:03:59
尝试'xmlDoc.responseXML' – d4rkpr1nc3 2013-03-25 14:14:32
在上面的答案中,你需要在readyState ==,但除此之外它是一个赢家。 – flxa 2013-06-03 06:10:37