Elements

php\jsoup\Elements

abstract class

implements: Iterator

Methods


text()
Returns:string
hasText()
Returns:bool
html($html)
Parameters:
  • $htmlstring - (optional)
Returns:

string

outerHtml()
Returns:string
attr($attributeKey, $value)
Parameters:
  • $attributeKeystring
  • $value
    • (optional)
Returns:

string, php\jsoup\$this

hasAttr($attributeKey)
Parameters:
  • $attributeKeystring
Returns:

bool

removeAttr($attributeKey)
Parameters:
  • $attributeKeystring
Returns:

php\jsoup\Elements

addClass($class)
Parameters:
  • $classstring
Returns:

php\jsoup\Elements

removeClass($class)
Parameters:
  • $classstring
Returns:

php\jsoup\Elements

hasClass($class)
Parameters:
  • $classstring
Returns:

bool

toggleClass($class)
Parameters:
  • $classstring
Returns:

bool

val($value)
Parameters:
  • $valuestring - (optional)
Returns:

php\jsoup\$this

prepend($html)
Parameters:
  • $htmlstring
Returns:

php\jsoup\Elements

append($html)
Parameters:
  • $htmlstring
Returns:

php\jsoup\Elements

before($html)
Parameters:
  • $htmlstring
Returns:

php\jsoup\Elements

after($html)
Parameters:
  • $htmlstring
Returns:

php\jsoup\Elements

select($query)
Parameters:
  • $querystring
Returns:

php\jsoup\Elements

first()
Returns:php\jsoup\Element
last()
Returns:php\jsoup\Element
not($query)
Parameters:
  • $querystring
Returns:

php\jsoup\Elements

is($query)
Parameters:
  • $querystring
Returns:

bool

parents()
Returns:php\jsoup\Elements