Re: [PHP] XML HELP

2002-04-10 Thread Christopher J. Crane
Wow thanks so muchthis was a great help. "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey Christopher: > > > function CharacterHandler($Parser, $Line, $StockStuff) { > > array_push($StockStuff, $Line); > > print "$Line\n"; > > }

Re: [PHP] XML HELP

2002-04-10 Thread Analysis & Solutions
Hey Christopher: > function CharacterHandler($Parser, $Line, $StockStuff) { > array_push($StockStuff, $Line); > print "$Line\n"; > } ... snip ... > while ( list(,$Sym) = each($Symbols) ) { > global $StockStuff; Global is used INSIDE functions to allow variables to be brought in and out of th

RE: [PHP] XML HELP

2002-04-10 Thread Crane, Christopher
ok I tried this code and the array is still empty. By the way, my code looked the way it did because the browser or my mail client cut it off. I had each of the functions on one line for easy reading but because of the wrap I changed it to how you had it, which is how I would normally do it if eac

Re: [PHP] XML HELP

2002-04-10 Thread Michael Virnstein
Why don't you use this class...it's really good! http://sourceforge.net/projects/phpxpath/ "Analysis & Solutions" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey Christopher: > > On Mon, Apr 08, 2002 at 09:14:08PM -0400, Christopher J. Crane wrote: >

Re: [PHP] XML HELP

2002-04-09 Thread Analysis & Solutions
Christopher: On Tue, Apr 09, 2002 at 09:25:07AM -0400, Crane, Christopher wrote: > The problem is now back to the beginning, I can not get the $Line value, > which is the data I want to be pushed into an array. I did not get an error > with the code below, but I did not get any information when

RE: [PHP] XML HELP

2002-04-09 Thread Crane, Christopher
n"; ?> -Original Message- From: Christopher J. Crane [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 7:21 AM To: Crane, Christopher Subject: Fw: [PHP] XML HELP - Original Message - From: "Analysis & Solutions" <[EMAIL PROTECTED]> Newsgroups: ph

Re: [PHP] XML HELP

2002-04-08 Thread Analysis & Solutions
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: h

Re: [PHP] XML HELP

2002-04-08 Thread Christopher J. Crane
ok I tried this at your suggestion $sym="ikn"; $file = "http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$sym";; $StockStuff = array(); function startElement($parser, $name, $attribs) { print "<$name"; if (sizeof($attribs)) { while (list($k, $v) = each($attribs))

Re: [PHP] XML HELP

2002-04-08 Thread Analysis & Solutions
On Mon, Apr 08, 2002 at 06:32:42PM -0400, Christopher J. Crane wrote: > $file = > "http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$sym";; ... snip ... > while ($data = fread($fp, 4096)) { > if (!xml_parse($xml_parser, $data, feof($fp))) { ... snip ... You've got a whole series of