expl0it Posted April 22, 2010 Share Posted April 22, 2010 Hello there, Im having a few problems with this. firstly my code: <?php $file = "http://www.eve-markets.net/xml.php?listid=2363&key=v6UWzelPkcDrUjj"; function contents($parser, $data){ echo $data; } function startTag($parser, $data){ echo "<b>"; } function endTag($parser, $data){ echo "</b><br />"; } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startTag", "endTag"); xml_set_character_data_handler($xml_parser, "contents"); $fp = fopen($file, "r"); $data = fread($fp, 80000); if(!(xml_parse($xml_parser, $data, feof($fp)))){ die("Error on line " . xml_get_current_line_number($xml_parser)); } xml_parser_free($xml_parser); fclose($fp); ?> xml sheet:http://www.eve-markets.net/xml.php?listid=2363&key=v6UWzelPkcDrUjj i only want to parse the information between <buy> </buy> but im not too sure how to do this, Anyone help please? Quote Link to comment https://forums.phpfreaks.com/topic/199425-php-xml-parsing/ Share on other sites More sharing options...
CONFUSIONUK Posted April 25, 2010 Share Posted April 25, 2010 BUMP was just about to post this exact question, if someone could help us it be much appreciated Quote Link to comment https://forums.phpfreaks.com/topic/199425-php-xml-parsing/#findComment-1047896 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.