Perl script for extract data from xml files

Hi All, Prepare a perl script for extracting data from xml file. The xml data look like as

AC StartTime="1227858839" ID="88" ETime="1227858837" DSTFlag="false" Type="2" Duration="303" />
<AS StartTime="1227858849" SigPairs="119 40 98 15 100 32 128 18 131 23 70 39 123 20 120 27 100 17 136 12 134 21 141 25 140 52 125 42 116 25" Quality="Normal" />
<AC StartTime="1227858851" ID="89" ETime="1227858849" DSTFlag="false" Type="2" Duration="310" />
<AC StartTime="1227858852" ID="89" ETime="1227858850" DSTFlag="false" Type="2" Duration="10" />
<AC StartTime="1227858869" ID="90" ETime="1227858864" DSTFlag="false" Type="2" Duration="20"

Output look like : ID passed - 88:89:90
S.NO ID
1 88
2 89
3 88:89 - This time both ID present
4 90

Help me to provide solution. Thanks in advance

Perl has a nice module for xml:

XML::Simple

Sorry but what you provided is not a valid or comforming XML document (file).

Furthermore can you explain in detail what output you want for a given input. I cannot understand your example.

The input XML file contents as:
<AC StartTime="1227858839" ID="88" ETime="1227858837" DSTFlag="false" Type="2" Duration="303" />
<AC StartTime="1227858851" ID="89" ETime="1227858849" DSTFlag="false" Type="2" Duration="310" />
<AC StartTime="1227858869" ID="90" ETime="1227858864" DSTFlag="false" Type="2" Duration="20"/>

I need a perl script which generate this output. The perl script extract ID data from XML file and generate this report along with Index value as per command line :
perl extractxmldata 88 89 90

The Output look lie as:
Index ID
1 88
2 89
4 90

Please provide some solution, thanks in advance