FWIW, I have created a Windows program to convert the CallHistory.xml file...

<< < (3/5) > >>

mo832:
Also, in your OP topic heading, you use FWITW. Was that a typo? I looked it up, and nothing meaningful comes up, although FWIW is well known by now.

Fun Fact: If you search in Google with "FWITW" with nothing else, THIS post comes up as the FIRST link! You coined a new acronym ;)

Robert.Thompson:
Quote from: Mango on May 04, 2014, 08:59:29 am

Thanks; it worked a treat!

EDIT: Actually no it didn't.  All the phone numbers in the resulting .txt file are the same as the phone number of the most recent call. 


Hi Mango:

I just tested it again and could not replicate your problem. Could you please re-confirm that it is not working correctly?
Thanks a lot.

Rob.

Mango:
Here is some test data:

Code:

<?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:

Code:

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.

Mango:
It looks like the problem is because there is no PeerName2 and Number2 for some of my entries.  If I manually add those, the output is correct.

KAura:
guess that means op doesn't initialize
his variables between each line of
input to ""

Navigation

[0] Message Index

[#] Next page

[*] Previous page