We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0c9af7 commit 9001c35Copy full SHA for 9001c35
1 file changed
src/Tokenizer/XmlReaderTokenizer.php
@@ -50,6 +50,10 @@ public function tokenize(): Generator
50
$element->depth = ++$this->depth;
51
$this->renderAttributes($element);
52
53
+ if ($this->reader->isEmptyElement) {
54
+ $this->depth--;
55
+ }
56
+
57
yield $element;
58
} elseif ($this->reader->nodeType === XMLReader::TEXT) {
59
$text = new Text($this->reader->value, ($this->flags & self::XML_USE_CDATA));
0 commit comments