diff --git a/src/AbstractDocument.php b/src/AbstractDocument.php index f119b9e..8cd014e 100644 --- a/src/AbstractDocument.php +++ b/src/AbstractDocument.php @@ -551,7 +551,8 @@ public function getValue( $expr, $context = null ) */ public function setValue( $expr, $value, $context = null ) { - $this->getElement($expr, $context)->nodeValue = $value; + if (!is_null($value)) + $this->getElement($expr, $context)->nodeValue = $value; return $this; }