Html parsing problem

I have a html file whose content starts as below. I want to convert this html into an XML file. So first I need to eliminate the initial part i.e. TOC^TOC^-1^-1^,^-1^-1%

How can I do this.

TOC^TOC^-1^-1^,^-1^-1%<?xml version=“1.0” encoding=“utf-8”?>
<CustomerName>Acme Alpha</CustomerName>

<ItemId> 987</ItemId>

<Quantity unit=“12”>3</Quantity>





echo substr('abcdef', 1);     // bcdef

Open the file, run substr on the contents, write to another file.

But first of all I need to get the file contents to run substr on it. If I pass the file in file_get_contents then it’s only returning TOC^TOC^-1^-1^,^-1^-1%

This function is not considering the xml path

$x = file_get_contents("c:/tmp/test.xml");
echo substr($x, 23);

That works for me? Are you echoing it onto a page and looking at it in a browser or are you writing it to another file?