Oddly, the XML namespace spec leaves un-prefixed attributes as undefined behaviour, rather than inheriting the default namespace. While fixing this, I've also made most of the output ignore local aliases, because everyone should be using namespace URIs anyway.
26 lines
1 KiB
XML
26 lines
1 KiB
XML
<?xml version="1.0" ?>
|
|
<test:movies xmlns:test="https://github.com/IMSoP/simplexml_debug">
|
|
<test:movie>
|
|
<test:title>PHP: Behind the Parser</test:title>
|
|
<test:characters>
|
|
<test:character>
|
|
<test:name>Ms. Coder</test:name>
|
|
<test:actor>Onlivia Actora</test:actor>
|
|
</test:character>
|
|
<test:character>
|
|
<test:name>Mr. Coder</test:name>
|
|
<test:actor>El ActÓr</test:actor>
|
|
</test:character>
|
|
</test:characters>
|
|
<test:plot>
|
|
So, this language. It's like, a programming language.
|
|
Or is it a scripting language? All is revealed in this
|
|
thrilling horror spoof of a documentary.
|
|
</test:plot>
|
|
<test:great-lines>
|
|
<test:line>PHP solves all my web problems</test:line>
|
|
</test:great-lines>
|
|
<test:rating test:type="thumbs">7</test:rating>
|
|
<test:rating test:type="stars">5</test:rating>
|
|
</test:movie>
|
|
</test:movies>
|