October 24, 2024
Chicago 12, Melborne City, USA
PHP

DOM Xpath: select content between (invalid) use of nested and tags


I can’t select the content of articles (that where made in Craft), I persume because of the invalid use by my former websitebuilder of double / nested P-tags in the HTML.

To clarify the code of the page:

<div class="col-sm-1"></div> <div class="col-sm-5"> <h2>Title</h2> <p><p>TEXT I WANT TO SELECT</p></p>

I have tried these selection methods:

//p
//p/*[first()]
//p[contains(text(),'')
//p[contains(text(),'')]//p



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video