rendered paste body$xml = '<?xml version="1.0" encoding="UTF-8" standalone="no"?><article articleId="5859" lastModifiedById="13" metatype="Article" rootArticleId="4110" type="India"><title><![CDATA[india]]></title><created>20070516T200000</created><lastmodified>20070606T092337</lastmodified><section type="Paragraph"><title>india</title><asset type="HTML Multiline"><description>Paragraph</description><data><![CDATA[<h1>INDIA</h1><p class="details">First Line<br/>Second Line</p>]]></data></asset></section></article>'; $dom = new DOMDocument('1.0','utf-8'); $dom->loadXML($xml); $sections = $dom->getElementsByTagName('section'); foreach($sections as $section) { $xpath = new DomXPath($dom); $data = $section->getElementsByTagName('data'); $dataElem = $data->item(0); $d = new DOMDocument(); $d->loadHTML($dataElem->nodeValue); $xp = new DOMXPath($d); $details = $xp->query('//p[@class="details"]')->item(0)->textContent; var_dump($details); die(); }?>Returns:First LineSecond Line (the <br/> is removed.