[phpXML] write_xml and load_string
Brought to you by:
bs_php,
nigelswinson
From: <ne...@ma...> - 2001-10-05 10:14:49
|
Hi! phpXML it is nice. but not yet write_xml(); i use: == cut == function write_xml($file_name, $xml_handler){ $file_cnt = $xml_handler->get_file(); $file_cnt = str_replace('<', '<', $file_cnt); $file_cnt = str_replace('>', '>', $file_cnt); $fp = fopen ($file_name, "w"); fputs($fp, $file_cnt); fclose($fp); } == /cut == str_replace because in output string is '<' and '>' but not '<' '>' and also fine create with function load_file($file_name) else function load_string($xml_string) i.e. "load_string" - first, and "load_file" create $content (i.e. $xml_string) call "load_string" which make all needed parsing. Ilya -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |