Hello everyone!
I'm really troubling my mind these days about a xml-parsing issue I have to solve. From one site I got this data:
http://www.nattguiden.no/feed/aktuelt/klassisk?user=kulturentusiastene
My application is recieving the data, and then I run some code I found here in another tread:
$filename = "http://www.nattguiden.no/feed/aktuelt/klassisk?user=kulturentusiastene";
if (!($dh = fopen($filename, "r")))
{
die("could not open XML input");
}
$data = fread($dh,10000);
$parser = xml_parser_create();
xml_parser_set_option ( $parser, XML_OPTION_CASE_FOLDING, 0 );
xml_parser_set_option ( $parser, XML_OPTION_SKIP_WHITE, 1 );
xml_parse_into_struct ( $parser, $data, $vals, $keys );
xml_parser_free ( $parser );
print_r ( $vals );
This seam to work out just fine. The result can be shown here:
http://www.kulturentusiastene.no/cp/get_aktiviteter.php
The problem is now; I want to put the data as rows into mySQL. I just can't sort it out; I just can't find a function that does it.
Anyone knows something about this? Any clue would be preciated .... need some sleep soon :o