参见英文答案 >
Implementing condition in XPath2
我正在尝试根据属性的值访问元素的内容.使用PHP SimpleXML.我有以下XML设置:
21242919
Nguyen T
[Hemoptysis and spontaneous rupture of a primary renal angiosarcoma: a case report.]
21242919
Oliveira GC
Disclosing ambiguous gene aliases by automatic literature profiling.
21242919
Vanderwall DE
Metformin and digestive disorders.
这些都是书.在这种情况下,我试图获得标题.我到目前为止是这样的:
$xml = simplexml_load_file(url);
$docs = $xml->DocSum;
foreach($docs as $book){
// Each book individual
}
哪里的评论是我尝试了很多东西.