有没有办法使用set :: class utiliy为指定的id提取数组?我无法弄清楚XPath。
即。我想提取id = 1
的数组[Document] => Array ( [0] => Array ( [id] => 1 [filename] => 1.txt ) [1] => Array ( [id] => 2 [filename] => 2.txt ) [2] => Array ( [id] => 3 [filename] => 3.txt ) )
答案 0 :(得分:1)
尝试:
Set :: extract('/ [id = 1]',$ data ['Document']);
或
Set :: extract('/ [id = 1] / ..',$ data ['Document']);