02-23-2011, 10:06 AM
|
|
Confirmed User
Join Date: Oct 2003
Location: Command Central, West Palm Beach, Fl
Posts: 1,794
|
Quote:
Originally Posted by HarryMuff
Use DOM? Don't think you can get the textNode children using simplexml.
Code:
$xml =
'<derp>
<Choice ID="1000">
<Select NAME="BOB" />
Monday
</Choice>
<Choice ID="1001">
<Select NAME="Mary" />
Tuesday
</Choice>
</derp>';
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->loadXML($xml);
foreach($dom->getElementsByTagName('Choice') as $choice)
{
$arr[] = $choice->textContent;
}
print_r($arr);
|
Off to give DOM a try
__________________
I do stuff - aIm CS_Jay_D
|
|
|