2017 © Pedro Peláez
 

library domparser

image

tje3d/domparser

  • Sunday, April 9, 2017
  • by tje3d
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

DomParser

This is a simple DomParser which can parse invalid html too. Edited version of http://simplehtmldom.sourceforge.net/., (*1)

Installation

composer require tje3d/domparser, (*2)

Examples

✔️ Parse a string

$dom = Tje3d\DomParser\DomParser::parse(file_get_contents('url'))

✔️ Query element

$dom->find('.elementClass') // All element's with this class
$dom->find('#myId', 0) // First element with this id
$dom->find('[name=user]')

✔️ Available Functions

innerText, innerHTML, html, getAllAttributes, getAttribute, attr, hasAttribute, parentNode, nextSibling, previousSibling, nodeName

Contact me

You can contact me via Telegram or Email., (*3)

The Versions

09/04 2017

dev-master

9999999-dev

  Sources   Download

MIT

by Avatar moein

09/04 2017

1.0.0

1.0.0.0

  Sources   Download

MIT

by Avatar moein