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";
> >  }
> ... snip ...
> > while ( list(,$Sym) = each($Symbols) ) {
> >  global $StockStuff;
>
> Global is used INSIDE functions to allow variables to be brought in and
> out of the function.  So, in this case, you'd have to put it as the
> first line inside the CharacterHandler function.
>
>
> >  print "1st Position in the array = $StockStuff[1]\n";
> ... snip ...
> > Christopher J. Crane
> > Network Operations Manager
> > IKON Office Solutions
>
> "1" is not the first position in an array.  "0" is. Considering that
> last step there and the signature below, I bet once you get the test
> working, you're just going to grab the array index number that has the
> latest stock quote in it put it on your company's website.
>
> If that's the case, you've got a problem.  What if NASDAQ changes the
> order that the fields are in?  That's right, you'll be putting the wrong
> data on the website.  You need to use an associative array, which means
> the array's index are words, and in this case, the words are the names
> of the data tags.
>
> I just whipped up a complete, basic, example of how to parse XML files
> using PHP.  Lucky for you, it uses your stock quote project as the
> model!  Go check it out:
>
>http://www.analysisandsolutions.com/code/phpxml.htm
>
> 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




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 the function.  So, in this case, you'd have to put it as the
first line inside the CharacterHandler function.


>  print "1st Position in the array = $StockStuff[1]\n";
... snip ...
> Christopher J. Crane
> Network Operations Manager
> IKON Office Solutions

"1" is not the first position in an array.  "0" is. Considering that
last step there and the signature below, I bet once you get the test
working, you're just going to grab the array index number that has the
latest stock quote in it put it on your company's website.

If that's the case, you've got a problem.  What if NASDAQ changes the
order that the fields are in?  That's right, you'll be putting the wrong
data on the website.  You need to use an associative array, which means 
the array's index are words, and in this case, the words are the names 
of the data tags.

I just whipped up a complete, basic, example of how to parse XML files
using PHP.  Lucky for you, it uses your stock quote project as the
model!  Go check it out:

   http://www.analysisandsolutions.com/code/phpxml.htm

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




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 each function had more than one line to it.
 
http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=';
 
 
function StartHandler($Parser, $ElementName, $Attr='') {
 print "$ElementName: ";
 }
 
function CharacterHandler($Parser, $Line, $StockStuff) {
 array_push($StockStuff, $Line);
 print "$Line\n";
 }
 
function EndHandler($Parser, $ElementName, $Attr='') {
 }
 
 
while ( list(,$Sym) = each($Symbols) ) {
 global $StockStuff;
 $StockStuff = array();

 $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);
 print "1st Position in the array = $StockStuff[1]\n";
  }
 
?>

Christopher J. Crane
Network Operations Manager

IKON Office Solutions
860.659.6464

 



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:
> > 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:
>
>
> 
> $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




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 printing the
> array.
... snip ...
> function StartHandler($Parser, $ElementName, $Attr='') { print
> "$ElementName: "; }

Allow me to nit pick.  That's hard to read.  This, on the other hand, is
clearer:
   function StartHandler($Parser, $ElementName, $Attr='') {
  print "$ElementName: ";
   }
Of course, you can do what you want, but then again, you're asking the 
public to look at your code.  Let alone, using standard indentation 
makes the code easier for you to understand as well...


> function CharacterHandler($Parser, $Line) { array_push($StockStuff, $Line);
> print "$Line\n"; }

You need to global the $StockStuff array in order for it to be available 
both inside and outside the function.


> 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);
>  
>  }
> 
> print "1st Position in the array = $StockStuff[0]\n";

You'll want to move this up into the while loop so it will do what you
want each time a file is parsed.

Similarly, don't forget to redeclare your $StockStuff array before
parsing the next file, otherwise you'll be sticking the new file's
contents at the end of all the other files' contents.  So, rather than 
putting the line
   $StockStuff = array();
at the beginning of the script, put it just inside the beginning of the 
while loop.

Enjoy,

--Dan

PS:  Be kind when posting.  Delete quoted text that's not necesary.

-- 
   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




RE: [PHP] XML HELP

2002-04-09 Thread Crane, Christopher

I got it to work with the following code. Thank you so much for your help.
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 printing the
array.


http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=';
 
 
function StartHandler($Parser, $ElementName, $Attr='') { print
"$ElementName: "; }

function CharacterHandler($Parser, $Line) { array_push($StockStuff, $Line);
print "$Line\n"; }
 
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);
 
 }

print "1st Position in the array = $StockStuff[0]\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: php.general
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Monday, April 08, 2002 10:33 PM
Subject: Re: [PHP] XML HELP


> 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:
> 
> 
>  
> $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




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:


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




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)) {
print " $k=\"$v\"";
}
}
print ">";
}

function endElement($parser, $name) {
//print "";
}

function characterData($parser, $data) {
 print "$data";
// array_push($StockStuff, $data);
}

function PIHandler($parser, $target, $data) {
switch (strtolower($target)) {
case "php":
global $parser_file;
// If the parsed document is "trusted", we say it is safe
// to execute PHP code inside it.  If not, display the code
// instead.
if (trustedFile($parser_file[$parser])) {
eval($data);
} else {
printf("Untrusted PHP code: %s",
htmlspecialchars($data));
}
break;
}
}

function defaultHandler($parser, $data) {
if (substr($data, 0, 1) == "&" && substr($data, -1, 1) == ";") {
printf('%s',
htmlspecialchars($data));
} else {
printf('%s',
htmlspecialchars($data));
}
}

function externalEntityRefHandler($parser, $openEntityNames, $base,
$systemId,
  $publicId) {
if ($systemId) {
if (!list($parser, $fp) = new_xml_parser($systemId)) {
printf("Could not open entity %s at %s\n", $openEntityNames,
   $systemId);
return false;
}
while ($data = fread($fp, 4096)) {
if (!xml_parse($parser, $data, feof($fp))) {
printf("XML error: %s at line %d while parsing entity %s\n",
   xml_error_string(xml_get_error_code($parser)),
   xml_get_current_line_number($parser),
$openEntityNames);
xml_parser_free($parser);
return false;
}
}
xml_parser_free($parser);
return true;
}
return false;
}


function new_xml_parser($file) {
global $parser_file;
 $xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1);
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
xml_set_processing_instruction_handler($xml_parser, "PIHandler");
xml_set_default_handler($xml_parser, "defaultHandler");
xml_set_external_entity_ref_handler($xml_parser,
"externalEntityRefHandler");

if (!($fp = @fopen($file, "r"))) {
return false;
}
if (!is_array($parser_file)) {
settype($parser_file, "array");
}
$parser_file[$xml_parser] = $file;
return array($xml_parser, $fp);
}

if (!(list($xml_parser, $fp) = new_xml_parser($file))) {
die("could not open XML input");
}

print "";
$Contents = implode( '', file($file) );
   if ( xml_parse($xml_parser, $Contents) ) {
die(sprintf("XML error: %s at line %d\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
print "";
xml_parser_free($xml_parser);

print "Array = $StockStuff[0]\n";

and I got an error that read "XML error:  at line 67". I am not sure what
that meant.


"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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 unneded steps and functions.  More
> importantly, you're sending the file to the parser line by line.  You
> need to send the whole file to the parser in one shot.
>
>$Contents = implode( '', file($file) );
>if ( xml_parse($xml_parser, $Contents) ) {
>   # Life is good!
>}
>
> Enjoy,
>
> --Dan
>
> --
>   PHP scripts 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 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409



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




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 unneded steps and functions.  More
importantly, you're sending the file to the parser line by line.  You
need to send the whole file to the parser in one shot.

   $Contents = implode( '', file($file) );
   if ( xml_parse($xml_parser, $Contents) ) {
  # Life is good!
   }

Enjoy,

--Dan

-- 
  PHP scripts 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 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409

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




[PHP] XML HELP

2002-04-08 Thread Christopher J. Crane

I am new to using XML and PHP for that matter. I have made some great
progress with the latter however.
My current problem is that I am trying to parse a relatively simple XML
file. The file can be found at
http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=ikn. I used
pieces of a sample file to create the following script:
$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)) {
print " $k=\"$v\"";
}
}
print ">";
}

function endElement($parser, $name) {
//print "";
}

function characterData($parser, $data) {
 print "$data";
The problem lies here ---
///The array is not initializing prior to this statement and I am
not sure how.
array_push($StockStuff, $data);
}

function PIHandler($parser, $target, $data) {
switch (strtolower($target)) {
case "php":
global $parser_file;
// If the parsed document is "trusted", we say it is safe
// to execute PHP code inside it.  If not, display the code
// instead.
if (trustedFile($parser_file[$parser])) {
eval($data);
} else {
printf("Untrusted PHP code: %s",
htmlspecialchars($data));
}
break;
}
}

function defaultHandler($parser, $data) {
if (substr($data, 0, 1) == "&" && substr($data, -1, 1) == ";") {
printf('%s',
htmlspecialchars($data));
} else {
printf('%s',
htmlspecialchars($data));
}
}

function externalEntityRefHandler($parser, $openEntityNames, $base,
$systemId,
  $publicId) {
if ($systemId) {
if (!list($parser, $fp) = new_xml_parser($systemId)) {
printf("Could not open entity %s at %s\n", $openEntityNames,
   $systemId);
return false;
}
while ($data = fread($fp, 4096)) {
if (!xml_parse($parser, $data, feof($fp))) {
printf("XML error: %s at line %d while parsing entity %s\n",
   xml_error_string(xml_get_error_code($parser)),
   xml_get_current_line_number($parser),
$openEntityNames);
xml_parser_free($parser);
return false;
}
}
xml_parser_free($parser);
return true;
}
return false;
}


function new_xml_parser($file) {
global $parser_file;
 $xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1);
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
xml_set_processing_instruction_handler($xml_parser, "PIHandler");
xml_set_default_handler($xml_parser, "defaultHandler");
xml_set_external_entity_ref_handler($xml_parser,
"externalEntityRefHandler");

if (!($fp = @fopen($file, "r"))) {
return false;
}
if (!is_array($parser_file)) {
settype($parser_file, "array");
}
$parser_file[$xml_parser] = $file;
return array($xml_parser, $fp);
}

if (!(list($xml_parser, $fp) = new_xml_parser($file))) {
die("could not open XML input");
}

print "";
while ($data = fread($fp, 4096)) {
 if (!xml_parse($xml_parser, $data, feof($fp))) {
die(sprintf("XML error: %s at line %d\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
print "";
xml_parser_free($xml_parser);

print "Array = $StockStuff[0]\n";

Ok so the problem is that I get an error telling me I have to create the
array first. If you can't tell, what I am trying to do is push the $data
part of the XML file into an array. There is probable 100+ better ways to do
this, but I can't figure how to get the information I want. I just wanted a
simple, very simple, stock retrieval piece of script. Everything I see is
too long and complex. So I thought I would simply parse this XML file. Benn
at it for two days now. I can easily get a CSV string from YAHOO.COm, but I
am not sure how to get that into an array either.

Any help here would be great. Either completely parsing the file or some way
of pushing the $data into the array $StockStuff




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