I have a 2 XML files, INPUT AND OUTPUT. I need to generate XSL file from input, to create a XML OUPUT file. Can you help me generate XSL file?
<?xml version="1.0" encoding="utf-8"?>
<odds xmlns:xsd="http://ift.tt/tphNwY" xmlns:xsi="http://ift.tt/ra1lAU">
<sport name="Soccer">
<region name="Europe">
<competition name="UEFA Champions League">
<event name="Real Madrid - FC Bayern München">
<market name="[Full Time] Money Line" suspended="false" id="216649202" expiry="2014-04-23T18:45:00Z" inRunning="false">
<outcome name="Real Madrid" id="49234983" price="2.35"/>
<outcome name="Draw" id="49234984" price="3.6"/>
<outcome name="FC Bayern München" id="49234985" price="2.8"/>
</market>
<market name="[Next Round] To Qualify" suspended="true" id="21905536" expiry="2014-04-24T19:05:00Z" inRunning="false">
<selection name="Benfica" id="49951019" price="2.4"/>
<selection name="Juventus" id="49951020" price="1.5"/>
</market>
<market name="[Full Time] HT/FT" suspended="false" id="21664919" expiry="2014-04-23T18:45:00Z" inRunning="false">
<outcome name="HWin-HWin" id="49234988" price="3.55"/>
<outcome name="HWin-Draw" id="49234986" price="15"/>
<outcome name="Draw-HWin" id="49234989" price="6"/>
<outcome name="AWin-AWin" id="49234993" price="4.5"/>
<outcome name="AWin-Draw" id="49234994" price="15"/>
<outcome name="Draw-AWin" id="49234990" price="7"/>
<outcome name="AWin-HWin" id="49234992" price="23"/>
<outcome name="HWin-AWin" id="49234987" price="34"/>
<outcome name="Draw-Draw" id="49234991" price="6"/>
</market>
</event>
</competition>
</region>
</sport>
</odds>
And OUTPUT XML will be:
<?xml version='1.0' ?>
<odds>
<group name="Soccer">
<group name="Europe">
<group name="UEFA Champions League">
<group name="Real Madrid - FC Bayern München">
<market name="[Full Time] Money Line" expiry="2014-04-23T18:45:00Z" inRunning="0" id="216649202">
<selection price="2.35" id="49234983" name="Real Madrid" handicap=""/>
<selection price="3.6" id="49234984" name="Draw" handicap=""/>
<selection price="2.8" id="49234985" name="FC Bayern München" handicap=""/>
</market>
<market name="[Full Time] HT/FT" expiry="2014-04-23T18:45:00Z" inRunning="0" id="21664919">
<selection price="3.55" id="49234988" name="Real Madrid/Real Madrid" handicap=""/>
<selection price="15" id="49234986" name="Real Madrid/Draw" handicap=""/>
<selection price="6" id="49234989" name="Draw/Real Madrid" handicap=""/>
<selection price="4.5" id="49234993" name="FC Bayern München/FC Bayern München" handicap=""/>
<selection price="15" id="49234994" name="FC Bayern München/Draw" handicap=""/>
<selection price="7" id="49234990" name="Draw/FC Bayern München" handicap=""/>
<selection price="23" id="49234992" name="FC Bayern München/Real Madrid" handicap=""/>
<selection price="34" id="49234987" name="Real Madrid/FC Bayern München" handicap=""/>
<selection price="6" id="49234991" name="Draw/Draw" handicap=""/>
</market>
</group>
</group>
</group>
</group>
</odds>
I have some troubles in this..maybe you will give me some advices or code. Thank you
No comments:
Post a Comment