Here is some test data:
<?xml version="1.0" encoding="UTF-8"?>
<CallHistoryFile>
<CallHistory date="5/1/2014" time="01:41:50">
<Terminal id="SP1" dir="Inbound">
<Peer name="Test1" number="1111111111"/>
<Event time="01:41:50">Ringing</Event>
<Event time="01:45:53">End Call</Event>
</Terminal>
<Terminal id="PHONE1" dir="Inbound">
<Peer name="" number=""/>
</Terminal>
</CallHistory>
<CallHistory date="5/2/2014" time="02:41:50">
<Terminal id="LINE1" dir="Inbound">
<Peer name="Test2" number="2222222222"/>
<Event time="02:41:50">Ringing</Event>
</Terminal>
<Terminal id="SP1" dir="Outbound">
<Peer name="" number="incoming"/>
<Event time="02:41:53">Call Connected</Event>
<Event time="02:41:59">End Call</Event>
</Terminal>
</CallHistory>
<CallHistory date="5/3/2014" time="03:49:22">
<Terminal id="SP1" dir="Inbound">
<Peer name="Test3" number="3333333333"/>
<Event time="03:49:22">Ringing</Event>
</Terminal>
<Terminal id="PHONE1" dir="Inbound">
<Peer name="" number=""/>
<Event time="03:49:33">Call Connected</Event>
<Event time="03:51:12">End Call</Event>
</Terminal>
</CallHistory>
</CallHistoryFile>
This was the result:
CallDate StartTime TermID1 Direction1 TermID2 Direction2 PeerName1 Number1 PeerName2 Number2 EndTime
5/1/2014 01:41:50 SP1 Inbound PHONE1 Inbound Test1 1111111111 01:45:53
5/2/2014 02:41:50 LINE1 Inbound SP1 Outbound 1111111111 Test2 2222222222 02:41:59
5/3/2014 03:49:22 SP1 Inbound PHONE1 Inbound 1111111111 2222222222 03:51:12
I also noticed that if I change the XML file, I have to restart the program before it will read the new one.