I have a rss-feed where every post ends with a link wrapped in a paragraph. I want it deleted.
Example:
<p>I want to keep this</p>
<p>I want to <strong>find</strong> and <a href="#">remove</a> this string</p>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, deleting the last paragraph can be done like:
If an RSS newsitem has its own class, like
class="RssRow", you could useeach()to remove the last child for each row: