誰でも私を助けることができますか?
基本的に私はXMLファイルを持っています
<AB NAME="A Quick Brown">
..some multiple node inside here
</AB>
<AB NAME="Fox Jumps Over">
..some multiple node inside here
</AB>
<AB NAME="The Lazy Dog">
..some multiple node inside here
</AB>
<AB NAME="The Quickbox">
..some multiple node inside here
</AB>
の属性で文字列を<AB>
検索して、この例の文字列全体と同様に TRUE の文字列を検索する必要があります。動作します
$string = "A Quick Brown";
$result = $xml->xpath("AB[@NAME ='$string']");
しかし、検索する必要があるのは"Quick"
、たとえば単語だけです
$string = "Quick";
// $result = $xml->xpath("AB[@NAME ='$string']");
ABの属性で、私は
<AB NAME="Fox Jumps Over">
..some multiple node inside here
</AB>
私のxmlの一部。
任意の提案、およびコメントは大歓迎です。前もって感謝します!