i have an xml file stored in an array (after getting it via nusoap)
so basically i have it stored in $result. If i do a print_r($result), it prints out the correct xml file.
Now, I have the code
$file = "myfile.xml";
// open XML file
if (!($fp = fopen($file, "r")))
{
die("Cannot locate XML data file: $file");
}
// read and parse data
while ($data = fread($fp, 4096))
{
// error handler
if (!xml_parse($xml_parser, $data, feof($fp)))
{
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
this is for opening up an xml file....i had saved that xml file to a file..but i don't want to do that anymore, i want to do the same thing as above, but instead of reading from a file, i need to read it from $result. How do i do this?