Hey Christopher:

On Mon, Apr 08, 2002 at 09:14:08PM -0400, Christopher J. Crane wrote:
> ok I tried this at your suggestion....

Not exactly.  As mentioned, you've got all sorts of unneded stuff going 
on.  To make sure you're on the right track, start with a new script 
with just the basics:


<?php

$Symbols[] = 'ek';
$Symbols[] = 'et';

$URI = 'http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=';


function StartHandler($Parser, $ElementName, $Attr='') {
}

function CharacterHandler($Parser, $Line) {
}

function EndHandler($Parser, $ElementName, $Attr='') {
}


while ( list(,$Sym) = each($Symbols) ) {
   $Contents = implode( '', file("$URI$Sym") );

   $Parser = xml_parser_create('ISO-8859-1');
   xml_set_element_handler($Parser, 'StartHandler', 'EndHandler');
   xml_set_character_data_handler($Parser, 'CharacterHandler');

   if ( xml_parse($Parser, $Contents) ) {
      echo 'YES!';
   } else {
      echo 'NO!';
   }

   xml_parser_free($Parser);

}

?>


Now, if that works, start flushing out the element/character handlers.  
Do it little by little to make sure each of your steps are correct.

Enjoy,

--Dan

-- 
               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution
    sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to