php - XMLReader and HTML code in node? -


i using xmlreader go through xml file. 1 of nodes contains html code, reader seems remove html code.

code:

$reader = new xmlreader(); $reader->open($file); while($reader->read()) {    $nodename = $reader->name;    if($nodename == 'description') {        $test = $reader->readstring(); // html removed, why?    }    } 

so, description node contains <b>this test</b>, $test var contains this test ... why?

thanks!

you should put html in cdata block!


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -