Suppose this is an XML file.
My logic to read this xml file using php is...
Now the problem is, The whole message tag is being read by this. I want only "Hello" to be read. What should be done?
Code:
<subject>Inquiry</subject> <message> <![CDATA[ <div>Hi</div> <div>Hello</div> <div>How Are You</div> ]]> </message>
Code:
$xml = simplexml_load_file("xml_mail_format2.xml");
foreach($xml->children() as $child)
{
if($child->getName() == "message")
{
foreach($child->children() as $children)
{
$message = $children;
}
}
}
Comment