Php - DOM Element

Card Puncher Data Processing

About

DOM - Element in php.

Operations

  • get an attribute
$domElement->getAttribute("src");
  • Loop over attributes
if ($domElement->hasAttributes()) {
            foreach ($domElement->attributes as $attr) {
                $name = $attr->name;
                $value = $attr->value;
                $node[$name] = $value;
            }
}
$domElement->textContent;







Share this page:
Follow us:
Task Runner