函数原型:class DOMElement { string getAttribute ( string name )} Return Values The value of the attribute, or an empty string if no attribute with the given name is found. 是不是扩展组件有什么问或不全。
不知道啊,我只是使用一个客户端,他们除了知道php版本,啥也不知道,用的人很少,我也只是用一点知识,搞得好像很复杂,这个是xml文件: <h1 name = "hit.edu.cn" anchor = ""> <h2 name = "www" anchor = "工大首页"> <h3 name = "about" anchor = "首页"> </h3> <h3 name = "department" anchor = "组织机构"> </h3> </h2> </h1> 试了getElementsByTagName()是可以用的,但是有的就不能用,是不是代码有问题? $doc存放的是第一个标签h1吗?
这个应该支持DOM扩展吧?
Return Values
The value of the attribute, or an empty string if no attribute with the given name is found.
是不是扩展组件有什么问或不全。
<h1 name = "hit.edu.cn" anchor = "">
<h2 name = "www" anchor = "工大首页">
<h3 name = "about" anchor = "首页">
</h3>
<h3 name = "department" anchor = "组织机构">
</h3>
</h2>
</h1>
试了getElementsByTagName()是可以用的,但是有的就不能用,是不是代码有问题?
$doc存放的是第一个标签h1吗?
服务器已经安装了,是不是我的xml和php文件都要放到那个安装的目录下
或者我是不是需要包含什么类似于c++的头文件的东西?
要不什么还是不能用呢?