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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -