PHP: capture a multiline substring

I have a long multiline string (its in a file that I can load into a string), lets take this as example: <response status=”success” code=”19″> <result total-count=”1″ count=”1″> <deviceconfig> <system> <type> <static/> </type> </system> <setting> </deviceconfig> </result> </response> <response status=”success” code=”19″> <result total-count=”1″ count=”1″> <network> <interface> <ethernet/> </interface> <profiles> <monitor-profile> <entry name=”default”> <interval>3</interval> <action>wait-recover</action> </entry>…

Details