I came across an XML file that had dashed attribute names:
<node attribute-name="dashed" />
This makes PHP's parser a bit unhappy if you try and access the attribute using:
$xml->attribute()->attribute-name
Fix it with some curly brackets: $node->attribute()->{'attribute-name'}.
Hurrah!
This is the blog of Ed van Beinum, a London-based open-source web developer. The blog is mostly a collection of notes-to-self and some useful links. They are made public in the hope that someone else may find them useful.