How do you get the VALUE of a hyphenated node? It seems like you can do everything else, except this.
Say you have some xml
<?xml version="1.0" encoding="UTF-8"?>
<doesntmatter xmlns="http://www.demandware.com/xml/impex/catalog/2006-10-31">
<list>
<one>one value</one>
<two-word>two word value</two-word>
</list>
</doesntmatter>
First, load the file.
$xml = simplexml_load_file('./file.xml');
NON-HYPHENATED
grab a non-hyphenated node
$xml->{'list'}->{'one'}[0];
get the value of the non-hyphenated node
$xml->{'list'}->one; // one value
HYPHENATED
grab the node
$xml->{'list'}->{'display-name'}[0];
get the VAUE of the node???
You can't do this:
$xml->{'list'}->two-word; // ERRORRRRRRRR
$xml->{'list'}->{'two-word'}; // doesn't output anything.
Once you have a node, how do you get the value of THAT node, rather than getting the value of a child node via a magic method that corresponds to that child node?