有关documentElement的问题

jhlcss 2002-04-19 01:51:32
对于xml文件:
tree.xml
------------------------------------------------------------
<?xml version="1.0" encoding="GB2312"?>
<tree>
<tree text="456" />
<tree text="企划部" src="tree.asp?id=d000000021" />
<tree text="开发管理部" src="tree.asp?id=d000000019" />
<tree text="产品部" src="tree.asp?id=d000000022" />
<tree text="项目部" src="tree.asp?id=d000000023" />
</tree>
------------------------------------------------------------
我alert(xmlDoc.documentElement)的时候是一个对象
而对于tree.asp
------------------------------
<?xml version="1.0" encoding="GB2312"?>
<tree>
<tree text="456" />
<tree text="企划部" src="tree.asp?id=d000000021" />
<tree text="开发管理部" src="tree.asp?id=d000000019" />
<tree text="产品部" src="tree.asp?id=d000000022" />
<tree text="项目部" src="tree.asp?id=d000000023" />
</tree>
------------------------------
提示为null,这是为什么?
...全文
55 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jhlcss 2002-04-19
  • 打赏
  • 举报
回复
karma不愧为微软专家,佩服佩服,以后还要多多请教
karma 2002-04-19
  • 打赏
  • 举报
回复
looks same to me, where are you doing the comparison?

when you output xml in test.asp, add this line at the top:
Response.ContentType = "text/xml"

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧