Skip to content

Instantly share code, notes, and snippets.

@Taluu
Last active June 11, 2016 17:53
Show Gist options
  • Save Taluu/24c6c908fda299069c756a2be38f81dc to your computer and use it in GitHub Desktop.
Save Taluu/24c6c908fda299069c756a2be38f81dc to your computer and use it in GitHub Desktop.
XMLReader {#3
+localName: "root"
+depth: 0
+attributeCount: 0
+hasAttributes: false
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#10 …}
}
XMLReader {#3
+localName: "a"
+depth: 1
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#8 …}
attributes: array:1 [
"id" => "1"
]
}
XMLReader {#3
+localName: "b"
+depth: 2
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#17 …}
attributes: array:1 [
"id" => "1.1"
]
}
XMLReader {#3
+localName: "c"
+depth: 3
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: true
+nodeType: ELEMENT
dom: DOMElement {#12 …}
attributes: array:1 [
"id" => "1.1.1"
]
}
XMLReader {#3 …10}
XMLReader {#3
+localName: "b"
+depth: 2
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: true
+nodeType: ELEMENT
dom: DOMElement {#11 …}
attributes: array:1 [
"id" => "1.2"
]
}
XMLReader {#3 …10}
XMLReader {#3
+localName: "a"
+depth: 1
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#10 …}
attributes: array:1 [
"id" => "2"
]
}
XMLReader {#3
+localName: "b"
+depth: 2
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#13 …}
attributes: array:1 [
"id" => "2.1"
]
}
XMLReader {#3
+localName: "c"
+depth: 3
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#17 …}
attributes: array:1 [
"id" => "2.1.1"
]
}
XMLReader {#3
+localName: "#text"
+depth: 4
+attributeCount: 0
+hasAttributes: false
+hasValue: true
+isDefault: false
+isEmptyElement: false
+nodeType: TEXT
dom: DOMText {#8 …}
+value: ""
}
XMLReader {#3 …10}
XMLReader {#3 …10}
XMLReader {#3
+localName: "b"
+depth: 2
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#12 …}
attributes: array:1 [
"id" => "2.2"
]
}
XMLReader {#3
+localName: "c"
+depth: 3
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: true
+nodeType: ELEMENT
dom: DOMElement {#13 …}
attributes: array:1 [
"id" => "2.2.1"
]
}
XMLReader {#3 …10}
XMLReader {#3
+localName: "b"
+depth: 2
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: false
+nodeType: ELEMENT
dom: DOMElement {#11 …}
attributes: array:1 [
"id" => "2.3"
]
}
XMLReader {#3
+localName: "#text"
+depth: 3
+attributeCount: 0
+hasAttributes: false
+hasValue: true
+isDefault: false
+isEmptyElement: false
+nodeType: TEXT
dom: DOMText {#18 …}
+value: ""
}
XMLReader {#3 …10}
XMLReader {#3 …10}
XMLReader {#3
+localName: "a"
+depth: 1
+attributeCount: 1
+hasAttributes: true
+hasValue: false
+isDefault: false
+isEmptyElement: true
+nodeType: ELEMENT
dom: DOMElement {#7 …}
attributes: array:1 [
"id" => "3"
]
}
XMLReader {#3 …9}
<?xml version="1.0" encoding="UTF-8"?>
<root>
<a id="1">
<b />
<b />
</a>
<a>
<b>
<c id="4">Random text</c>
</b>
<b />
<b>My Value</b>
<c />
</a>
<a />
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment