Fix #11: Use DOM to determine actual namespace of current element

This commit is contained in:
Rowan Collins 2017-11-09 23:10:38 +00:00
parent 16622d96f3
commit 627c7d5685
5 changed files with 62 additions and 36 deletions

View file

@ -0,0 +1,11 @@
SimpleXML object (1 item)
[
Element {
Name: 'notinnamespace'
String Content: ''
Content in Namespace test
Namespace URI: 'http://example.com'
Children: 0
Attributes: 1 - 'isinnamespace'
}
]

2
tests/input/issue-11.xml Normal file
View file

@ -0,0 +1,2 @@
<?xml version="1.0" standalone="yes"?>
<notinnamespace xmlns:test="http://example.com" test:isinnamespace="true" />

View file

@ -0,0 +1,4 @@
SimpleXML object (1 item)
[0] // <notinnamespace>
->attributes('http://example.com')
->isinnamespace