Suggest proper approach to parse invalid xml response with namespaces in this case
问题 I am using php to parse xml response of an API. Here is a sample response - $xml = '<?xml version="1.0"?> <q:response xmlns:q="http://api-url"> <q:impression> <q:content> <html> <meta name="HandheldFriendly" content="True"> <meta name="viewport" content="width=device-width, user-scalable=no"> <meta http-equiv="cleartype" content="on"> </head> <body style="margin:0px;padding:0px;"> <iframe scrolling="no" src="http://api-response-url/with/lots?of=parameters&somethingmore=someval" width="320px"