I'm trying to parse an xml document with PHP. I've been using simplexml which has worked up until this last part where it is trying to parse an xml field that has basically an html webpage in it. I don't have the ability to adjust the xml document so this is what i'm working with.
<DataContent>
<!-- start embedded XHTML document -->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xn="http://www.xmlnews.org/ns/">
<head>
<meta content="text/html" http-equiv="Content-Type" charset="UTF-8"/>
<title>title of page</title>
etc...
</body>
</html>
<!-- end embedded XHTML document -->
</DataContent>
So i go to parse it and it doesn't parse any of it. Anyway to grab the entire DataContent field?
Trying this does not work
$BodyContent=$xml->Item->Component->ContentItem->DataContent;