this is my Xml file which i want to convert into prolog? this code cantains number of condition and each time dependant on another one,so relacing this xml file with prolog i have to parse it first ,so below my parsed code is available ,check that give me a proper solution for this.
<condition name="is_lgi"> <parameter node="SPCU" id="010102" type="short" /> <eq /> <constant value="1" /> </condition> <condition name="is_gi"> <parameter node="SPCU" id="010102" type="short" /> <eq /> <constant value="0" /> </condition> <group text="Running Conditions"> <item text="No Cylinders are Cut Out
or Chief Limited"> <outvar node="ECUA" id="02012008" /> <eq /> <constant value="false" /> </item> <item text="No FWE Request"> <outvar node="ECUA" id="010110" /> <eq /> <constant value="false" /> </item> <item text="No Slowdown"> <outvar node="ECUA" id="010124" /> <eq /> <constant value="false" /> </item> <item text="Cylinder Monitoring Ok"> <outvar node="SPSU" id="0240" /> <eq /> <constant value="true" /> </item> <item text="Second Fuel Supply
System Ready"> <outvar node="SPCU" id="600202" /> <eq /> <constant value="true" /> </item> <group> <if condition="is_lgi" /> <item text="Return Purge Block Ok"> <outvar node="SPCU" id="0413" /> <eq /> <constant value="true" /> </item> <item text="Cool Seal Oil System Ready"> <outvar node="SPCU" id="0410" /> <eq /> <constant value="true" /> </item> <item text="Return Pipe Manual
Valve Open"> <outvar node="SPCU" id="0421" /> <eq /> <constant value="true" /> </item> </group> </group> <group text="No Standby"> <item text="Index > Standby Limit"> <outvar node="ECUA" id="0201DF45" /> <eq /> <constant value="false" /> </item> </group> </xml> how can i parse this code into prolog..? help me as early as posible?? i was parsed this file in prolog likewise...
myprolog parsed code:-
group('Running Conditions', item('No Cylinders are Cut Out
or Chief Limited', outvar('ECUA', '02012008'), operator(eq), constant('false') ), item('No FWE Request', outvar('ECUA', '010110'), operator(eq), constant('false') ), item('No Slowdown', outvar('ECUA', '010124'), operator(eq), constant('false') ), item('Cylinder Monitoring Ok', outvar('SPSU', '0240'), operator(eq), constant('true') ), item('Second Fuel Supply
System Ready', outvar('SPCU', '600202'), operator(eq), constant('true') ) ). is this correct way of parsing??.
No comments:
Post a Comment