'PHP XPath text between two elements
This is my HTML
<dd><h1>Article Name 1</h1><p>
<div align="right"><a href="mailto:[email protected]">Author 1</a></div>
... HTML Text (includes HTML tags) ... <br>(sometimes is <p>)
... HTML Text (includes HTML tags) ... <br>(sometimes is <p>)
... HTML Text (includes HTML tags) ... <p>
<div align="right"><a href="mailto:[email protected]">Author 2</a></div>
... HTML Text (includes HTML tags) ...<p>
<hr noshade>
<dd><h1>Article Name 2</h1><p>
<div align="right"><a href="mailto:[email protected]">Author 3</a></div>
... HTML Text (includes HTML tags) ... <p>
<div align="right"><a href="mailto:[email protected]">Author 2</a></div>
... HTML Text (includes HTML tags) ... <br>(sometimes is <p>)
... HTML Text (includes HTML tags) ...<p>
<hr noshade>
I need to parse article name, authors and their texts. I managed to parse name and authors, but I still can't parse text of article for each author.
This is sample HTML is from 1998 and I'm trying parse it from internet archive on Wayback Machine so I don't have any control on actual code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
