[Expat-discuss] Result of outline.c from the win32 expat binary

Ryan Luyao rluyao at info.com.ph
Tue Nov 18 00:21:34 EST 2003


Good Day!

This is my first time to develop applications using expat.
I have successfully build the win32 expat binary with Visual
Studio and of course compile and run my expat applications.
As a first timer i have successfully compile elements.c and
outline.c in the examples directory. I just want to confirm if
this is the correct output that i am getting out from outline.c

My sample.xml file looks like this:

<nutrition>
<daily-values>
<total-fat units="g"> 65 </total-fat>
<saturated-fat units="g"> 20 </saturated-fat>
<cholesterol units="mg"> 300 </cholesterol>
<sodium units="mg"> 2400 </sodium>
<carb units="g"> 300 </carb>
<fiber units="g"> 25 </fiber>
<protein units="g"> 50 </protein>
</daily-values>
<food>
<name>Avocado Dip</name>
<mfr>Sunnydale</mfr>
<serving units="g"> 29 </serving>
<calories total="110" fat="100"/>
<total-fat> 11 </total-fat>
<saturated-fat> 3 </saturated-fat>
<cholesterol> 5 </cholesterol>
<sodium> 210 </sodium>
<carb> 2 </carb>
<fiber> 0 </fiber>
<protein> 1 </protein>
<vitamins>
     <a> 0 </a>
     <c> 0 </c>
</vitamins>
<minerals>
     <ca> 0 </ca>
     <fe> 0 </fe>
</minerals>
</food>
</nutrition>

i execute outline.c with this syntax:
     outline.exe < sample.xml
and got this output:
n
   d
     t u='g'
     s u='g'
     c u='m'
     s u='m'
     c u='g'
     f u='g'
     p u='g'
   f
     n
     m
     s u='g'
     c t='1' f='1'
     t
     s
     c
     s
     c
     f
     p
     v
       a
       c
     m
       c
       f

I was expecting the complete tag label instead of just the first letter.
Is there any way to print the whole tag label?

By the way, any suggestions and some sample code that you can provide on
how to get the data between the tags; <item> justanitem </item>, storing
justanitem to a variable.

I really really appreciate inputs on this. Thanks in advance!







More information about the Expat-discuss mailing list