Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
idの例の中でインクリメントされるdividをプルするPHPスクリプトを書いています。
<div id="tag_1">content</div> <div id="tag_2">content</div>
したがって、基本的に、次のようなワイルドカードを使用してクエリdomxpathを作成するにはどうすればよいですか。
$nodes = $xpath->query("//div[@id='tag_.*']");
で始まるを使用できます
"//div/@id[starts-with(., 'tag_')]/.."