Slip 3 - B) Write a script to create “cricket.xm1” file with multiple elements as shown below:

 Solution:

<CricketTeam>
<Team country="India">
<player>ROHIT SHARMA</player>
<runs>2850</runs>
<wicket>5</wicket>
</Team>

<Team country="England">
<player>Ben Stokes</player>
<runs>2650</runs>
<wicket>25</wicket>
</Team>
<Team country="Australia">
<player>Steve Smith</player>
<runs>7000</runs>
<wicket>20</wicket>
</Team>
<Team country="West Indies">
<player>DJ BRAVO</player>
<runs>9000</runs>
<wicket>225</wicket>
</Team>
<Team country="Bangladesh">
<player>Shakib-al-Hasan</player>
<runs>4190</runs>
<wicket>135</wicket>
</Team>
</CricketTeam> 

Post a Comment

0 Comments