I am using this code to get content of a web site: \[code\]$data = http://stackoverflow.com/questions/12415571/file_get_contents('http://domain.com/');\[/code\]And for now, I want to convert \[code\]$data\[/code\] to an XML object to parse it easily. For example: \[code\]<?xml version='1.0' encoding='ISO-8859-1'?><html> <body> <div id='main'> </div> </body></html>\[/code\]Thank in advance