size limit when parsin?
Is there a limit size when parsing an xml? I'm using a code that parse an xml, and writes it as csv. Until the value 3240 it works fine, but the it stops. The xml still has data but is not parsed anymore. My code is
----php file---------------------
$file = "../realtime/zwem_rap_voor_ftp.xml";
function contents($parser, $data){
//$da[i] = $data;
echo $a=$data. ",";
//echo ",";
$da[i] = $a;
$conactenado = $a.$a;
//$i = $i+1;
//echo $da[1];
}
function startTag($parser, $data){
//echo $parser;
}
function endTag($parser, $data){
// echo " <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);
Originally Posted by
vladyman
$data = fread($fp, 80000);
I almost hate to ask, but does 80000 bytes happen to correspond with your 3240 "value"?
Dave
ups missed that point
thanks so much
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks