Thanks for the replies...but no joy yet. The XML data looks like this (I'm minimizing it)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document>
<channels>
<channel>
<episode>
<episode-content>
<doc>
<cncpts>
<cn doc="true" er="164" kw="false" ne="true" sc="9.647706" sr="164" t="unk">here I am</cn>

and I have

$t = simplexml_load_file('text.xml','SimpleXMLElement', LIBXML_NOCDATA);
    dsm($t);
foreach ($t->channels->channel->nlp->episode->{episode-content}->doc->cncpts->cn as $k) {
        $dsm($k);
    }

The first dsm immediately after loading the file does not show the seven 'cn' elements that I have, and the second is empty because the foreach complains.

Reply via email to