XML Parser
am 04.01.2008 12:49:58 von Richard PriceI am updating a xml parser developed by a third party. The xml below is
parsed by the system using the code that follows:
-
-
-
-
$extract = parseXMLForLtd($xml, $type);
function parseXMLForLtd($xml="", $type) {
preg_match_all( "/\
$reportData[0] = preg_replace('/\n/i','',$reportData[0]);
$result = $reportData[0];
for($i=0; $i
if(eregi('
$extract[name] = preg_replace('/([<][\/a-zA-Z0-9 ="-]+[>])/i', '',
$item);
However when I try to parse a the other field called "name" using:
else if(eregi('
$extract[secretary] = preg_replace('/([<][\/a-zA-Z0-9 ="-]+[>])/i',
'', $item);
It does not work. Could anyone please advise how I can extract "Fred
Bloggs"?
Thanks In Advance