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 -

c# - Abstract method in public abstract class implementing an internal interface doesn't compile? -

authentication - Mongodb revoke acccess to connect test database -