PHP Classes

Extract body text in html document: I need to parse a HTML document and extract the text part

Recommend this page to a friend!
  All requests RSS feed  >  Extract body text in html document  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

Extract body text in html document

Edit

Picture of Erik Maaløe by Erik Maaløe - 8 years ago (2015-11-10)

I need to parse a HTML document and extract the text part

This request is clear and relevant.
This request is not clear or is not relevant.

+2

How to I extract the text content from a HTML document, skipping all HTML tags

Ask clarification

1 Recommendation

HTML Parser: Parse HTML using DOMDocument

This recommendation solves the problem.
This recommendation does not solve the problem.

+2

Picture of Dave Smith by Dave Smith package author package author Reputation 6845 - 8 years ago (2015-11-10) Comment

This will parse the document using donDOcument and if I am not mistaken the node->value of the body tag will contain all the text without the html, so using this class you would process the body tag.


Recommend package
: 
: