Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1989
  • Last Modified:

expat example

Expat example....here is the code...
http://sysu817200.tripod.com/
-------------------------------------
Here are the error messages...
----------------------------------------
the error logs are in output.txt

Pleas help me fix run time errors...
Rgds,
0
sudarshantk
Asked:
sudarshantk
2 Solutions
 
AxterCommented:
Hi sudarshantk,
Please post your runtime errors, and show the assoicated line of code the errors refer to.

Cheers!
0
 
sudarshantkAuthor Commented:
I am able to parse the xml file correctly..but when i store the values into internal structures it gives following errors..
-----------------------------------------------------------------------------------------------------

IP=192.168.1.1
PRESENT=1
HEARTBEAT TYPE=1
HEARTBEAT PERIOD=0
PERIODIC PERIOD=60
PERIODIC TOGGLE=1
PERIODIC VALUE=¨—ÿ¿®‚xi
PERIODIC VALUE=111111111111111111111oggle="true">loseheartbea
PERIODIC VALUE=¨—ÿ¿®‚x1
PERIODIC VALUE=</periodic>1111111111oggle="true">l
PERIODIC VALUE=¨—ÿ¿®‚xd
PERIODIC VALUE=<ondemand>>1111111111oggle="true">l
ONDEMAND TOGGLE=0
ONDEMAND VALUE=¨—ÿ¿®‚xn
ONDEMAND VALUE=0000000000000000000001ggle="true">l
ONDEMAND VALUE=¨—ÿ¿®‚x0
ONDEMAND VALUE=0000000000000000000002ggle="true">l
ONDEMAND VALUE=¨—ÿ¿®‚x0
ONDEMAND VALUE=0000000000000000000003ggle="true">l
ONDEMAND VALUE=¨—ÿ¿®‚x0
ONDEMAND VALUE=</ondemand>00000000003ggle="true">l
ONDEMAND VALUE=¨—ÿ¿®‚xa
ONDEMAND VALUE=</tags>a
ONDEMAND VALUE=¨—ÿ¿®‚xa
ONDEMAND VALUE=</ip>‚xa
IP=192.168.1.2
PRESENT=0
HEARTBEAT TYPE=0
HEARTBEAT PERIOD=0
PERIODIC PERIOD=0
PERIODIC TOGGLE=0
ONDEMAND TOGGLE=0
ONDEMAND VALUE=¨—ÿ¿®‚xa
ONDEMAND VALUE=<ipval="192.168.1.2"present="false"></ip>rtbea
IP=192.168.1.3
PRESENT=1
HEARTBEAT TYPE=0
HEARTBEAT PERIOD=200
PERIODIC PERIOD=60
PERIODIC TOGGLE=0
PERIODIC VALUE=¨—ÿ¿®‚xi
PERIODIC VALUE=311111111111111111111rese
PERIODIC VALUE=¨—ÿ¿®‚x1
PERIODIC VALUE=</periodic>1111111111rese
PERIODIC VALUE=¨—ÿ¿®‚xd
PERIODIC VALUE=<ondemandtoggle="false">e
ONDEMAND TOGGLE=0
ONDEMAND VALUE=¨—ÿ¿®‚xn
ONDEMAND VALUE=3000000000000000000001">e
ONDEMAND VALUE=¨—ÿ¿®‚x0
ONDEMAND VALUE=3000000000000000000002">e
ONDEMAND VALUE=¨—ÿ¿®‚x0
ONDEMAND VALUE=3000000000000000000003">e
ONDEMAND VALUE=¨—ÿ¿®‚x0
ONDEMAND VALUE=</ondemand>00000000003">e
ONDEMAND VALUE=¨—ÿ¿®‚xa
ONDEMAND VALUE=</tags>a
ONDEMAND VALUE=¨—ÿ¿®‚xa
ONDEMAND VALUE=</ip>‚xa
----------------------------------------------------
0
 
sudarshantkAuthor Commented:
line of code that prints the above is
232-243 line.c
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
manish_regmiCommented:
1) your reader.txt contains invalid xml. I have already spotted the errors in your prevoius question. please replace it with new one i posed.

2)
<ondemand  toggle=”false”>
                       3000000000000000000001
                       3000000000000000000002
                       3000000000000000000003
</ondemand>

If these are three seperate values put them in seperate tag. If they are single value don't use newline.

<ondemand  toggle=”false”>
                       3000000000000000000001
 </ondemand>
<ondemand  toggle=”false”>
                       3000000000000000000002
 </ondemand>
<ondemand  toggle=”false”>
                       3000000000000000000003
 </ondemand>

regards
Manish Regmi
0
 
manish_regmiCommented:
also in char_hndl(),

you may not have got whole value

shouldn't it  be

for(l=0; l < txtlen; l++)

regards
Manish Regmi
0
 
cwwkieCommented:
>> If these are three seperate values put them in seperate tag. If they are single value don't use newline.

Or use a contruct like this:

<ondemand  toggle=”false”>
                       <data>3000000000000000000001</data>
                       <data>3000000000000000000002</data>
                       <data>3000000000000000000003</data>
</ondemand>
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now