Modern DOM library written in PHP for HTML documents
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @license MIT
|
|
|
|
* Copyright 2017 Dustin Wilson, J. King, et al.
|
|
|
|
* See LICENSE and AUTHORS files for details
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MensBeam\HTML\DOM;
|
|
|
|
|
|
|
|
|
|
|
|
class XMLDocument extends Document {
|
|
|
|
protected string $_contentType = 'application/xml';
|
|
|
|
|
|
|
|
|
|
|
|
public function load(string $source = null, ?string $charset = null): void {
|
|
|
|
if ($this->hasChildNodes()) {
|
|
|
|
throw new DOMException(DOMException::NO_MODIFICATION_ALLOWED);
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->_innerNode->loadXML($source);
|
|
|
|
}
|
|
|
|
}
|