Hello, everybody. Sorry to disturb you all.
Currently, I have a speech recording and playback software developed by Microsoft Visual C++ 6.0. The software is used to train children with speech problem and scores will be calculated and showed at the end of each practice session. The software is able to record and playback real-time.

Children use this software at home and save their practice records in a single floppy disk. Then, children will bring the floppy disk with practice records inside when they return to our centre.

I have two problems with the xml programming part. My software automatically created history file (in XML format) to display the scores of the children’s practices. The history file (in XML format) is saved by the children in floppy disk when they return to our centre.
But, the data or information in the XML is in a mess where all data are put together. Do you mind to tell me what should I do to create more organized XML format? The therapist needs to scroll in order to read the scores. I have the program codes of XML in four of my cpp files.

The second question is how to call or open XML file (the history file) from my software?
My codes are as below. After I execute the program, it is error free and the File Open dialog box is popped up but no XML file came out after I select the desired XML file. My codes are as below:

void CSpeechDlg::OnScore() 
    // TODO: Add your command handler code here
CFileDialog openfile(TRUE,NULL,NULL,OFN_OVERWRITEPROMPT,"XML File (*.xml)|*.xml|");
    if (openfile.DoModal()==IDOK)
        CString cs=openfile.GetFileName();
        char* filename=new char[cs.GetLength()+1];


I promise I wont disturb you a lot, I promise I will do my best. Can you please help me?
I am totally new to this as the software is written by one of my previous friend who worked together with me in a voluntary speech rehabilitation centre. We need this software to train children in the centre. I work part time there.

Hope you can give me some guidances on how to do it. I promise I can learn as independent as possible but I really need your guidance at this very beginning, please.
Please, I really appreciate all your help.

Edited by pyTony: fixed formatting

12 Years
Discussion Span
Last Post by cindy_16051988

Hi, I attached the sample of the hisrory file created by my software. Hope I can get some advices. Thank you.

<xml version="1.0" >
<test Technique="1" Sentence="1" Date="04/27/06" Time="16:11:10" StartScore="100" Endscore="100" MaximumMagnitudeScore="0" DurationScore="100" AverageScore="75" />
<test Technique="1" Sentence="2" Date="04/27/06" Time="16:11:27" StartScore="70" Endscore="30" MaximumMagnitudeScore="50" DurationScore="0" AverageScore="37" />
<test Technique="1" Sentence="3" Date="04/27/06" Time="16:11:44" StartScore="80" Endscore="0" MaximumMagnitudeScore="20" DurationScore="0" AverageScore="25" />
<test Technique="1" Sentence="4" Date="04/27/06" Time="16:11:59" StartScore="50" Endscore="90" MaximumMagnitudeScore="0" DurationScore="40" AverageScore="45" />
<test Technique="1" Sentence="5" Date="04/27/06" Time="16:12:15" StartScore="100" Endscore="90" MaximumMagnitudeScore="70" DurationScore="90" AverageScore="87" />
<Score Technique="1" Date="04/27/06" Time="16:12:21" StartScore="80" Endscore="62" MaximumMagnitudeScore="28" DurationScore="46" AverageScore="54" />
<test Technique="2" Sentence="1" Date="04/27/06" Time="16:12:37" StartScore="70" Endscore="50" MaximumMagnitudeScore="90" DurationScore="90" AverageScore="75" />
<test Technique="2" Sentence="2" Date="04/27/06" Time="16:12:55" StartScore="90" Endscore="0" MaximumMagnitudeScore="80" DurationScore="0" AverageScore="42" />
<test Technique="2" Sentence="3" Date="04/27/06" Time="16:13:11" StartScore="100" Endscore="0" MaximumMagnitudeScore="0" DurationScore="0" AverageScore="25" />
<test Technique="2" Sentence="4" Date="04/27/06" Time="16:13:25" StartScore="100" Endscore="100" MaximumMagnitudeScore="0" DurationScore="90" AverageScore="72" />
<test Technique="2" Sentence="5" Date="04/27/06" Time="16:13:46" StartScore="90" Endscore="40" MaximumMagnitudeScore="60" DurationScore="50" AverageScore="60" />
<Score Technique="2" Date="04/27/06" Time="16:13:50" StartScore="90" Endscore="38" MaximumMagnitudeScore="46" DurationScore="46" AverageScore="55" />
<test Technique="3" Sentence="1" Date="04/27/06" Time="16:14:07" StartScore="90" Endscore="0" MaximumMagnitudeScore="100" DurationScore="0" AverageScore="47" />
<test Technique="3" Sentence="2" Date="04/27/06" Time="16:14:22" StartScore="80" Endscore="40" MaximumMagnitudeScore="30" DurationScore="10" AverageScore="40" />
<test Technique="3" Sentence="3" Date="04/27/06" Time="16:14:38" StartScore="100" Endscore="30" MaximumMagnitudeScore="0" DurationScore="30" AverageScore="40" />
<test Technique="3" Sentence="4" Date="04/27/06" Time="16:15:04" StartScore="90" Endscore="100" MaximumMagnitudeScore="0" DurationScore="100" AverageScore="72" />
<test Technique="3" Sentence="5" Date="04/27/06" Time="16:15:22" StartScore="90" Endscore="100" MaximumMagnitudeScore="70" DurationScore="100" AverageScore="90" />
<Score Technique="3" Date="04/27/06" Time="16:15:24" StartScore="90" Endscore="54" MaximumMagnitudeScore="40" DurationScore="48" AverageScore="58" />

Hi, WolfPack, thank you very much for your information.

Just asking, forgive me if I am wrong. Is it possible to copy the data in the XML file to a MFC dialog box? The data in the XML file is updated from time to time. I am just asking, I dont know whether it can be done or not. But, I just hope my problem can be solved using the simplest method as I am so stupid and I do not have enough knowledge due to my short experiences with programming (just about 2++ months) plus I am slow learner. Please forgive me. I didnt mean to confuse with so many methods but I just hope to learn the simplest so that the children can use the computer as soon as possible.

There are 3 things in my mind now: XSLT, Modify using XML Parser, open XML file in MFC dialog. Do you mind to give your opinions on which one is easier to display the children's scoring to the therapist?

I am sorry to disturb you but I really dont know how and what should I focus now. If dont know, nevermind, sorry to waste your time. thanks.



I have been reading for the XML tutorial for the past few days. I realized that I have two problems to be overcome.

1. My XML is not in a well-formed format. I would like to find out which section is wrong. Is there any web software to test or validate the XML? I tried the link below but I dont know why it cant work. Is there any other link to be used?

2. From what I read, it specified that I should try to avoid the use of attributes if information feels like data, Use child elements if the information feels like data. In my case, many attributes are used and the information to be displayed are scoring data, means I should change the use of attributes to child elements? Do you mind to elaborate on how to change the use of attributes to child elements in the codes?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.