$this->errors
[] =
sprintf('Line %d, Col %d: %s',
$line,
$col,
$msg);
} public function getErrors() { return $this->errors;
} public function cdata($data) { $node =
$this->doc->
createCDATASection($data);
$this->current->
appendChild($node);
} public function processingInstruction($name,
$data = null
) { // XXX: Ignore initial XML declaration, per the spec.
if ($this->insertMode ===
static::IM_INITIAL && 'xml' ===
strtolower($name)) { return;
} // Important: The processor may modify the current DOM tree however it sees fit.