dora16
04-20-2009, 02:05 AM
Hi friends i am pretty new to xml and am using ob editor for the first time i have to use ob-editor for content management sytem for a flash project..it is supposed to generate a xml file. but it does not automatically generate it. the code i have used here is
$filteredHTML = filterHTML($_POST['content']);
$filename = 'xml/test_'.time().'.xml';
$open = fopen($filename, "w+");
$content1="<note><mydeta>". $filteredHTML ."</mydeta></note>";
fwrite($open, $content1);
fclose($open);
it is generating xml files..while editing the content i read the file and store it in session and echo it in editor.
$file = "xml/test_".$id.".xml";
$xml_parser = xml_parser_create();
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
$data = fread($fp, filesize($file));
$data1=stripslashes($data);
$_SESSION['xmldata']=trim($data1);
but this data generate a space before and after the content which while editing generates error.
if any one has used ob-editor and knows its functionality plz help me.. it is very urgent for me:confused::confused::confused:
$filteredHTML = filterHTML($_POST['content']);
$filename = 'xml/test_'.time().'.xml';
$open = fopen($filename, "w+");
$content1="<note><mydeta>". $filteredHTML ."</mydeta></note>";
fwrite($open, $content1);
fclose($open);
it is generating xml files..while editing the content i read the file and store it in session and echo it in editor.
$file = "xml/test_".$id.".xml";
$xml_parser = xml_parser_create();
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
$data = fread($fp, filesize($file));
$data1=stripslashes($data);
$_SESSION['xmldata']=trim($data1);
but this data generate a space before and after the content which while editing generates error.
if any one has used ob-editor and knows its functionality plz help me.. it is very urgent for me:confused::confused::confused: