TY_BCA_AWT_SLIP 27_2


27  .Write a script to create “cricket.xml” file with multiple elements as shown below:
<CricketTeam>
<Team country=”India”>
<player>____</player>
<runs>______</runs>
<wicket>____</wicket>
</Team>
</CricketTeam>
Write a script to add multiple elements in “cricket.xml” file of category, country=”Australia”.


XML file :

<?xml version='1.0' encoding='UTF-8' ?>
<CricketTeam>
            <Team country='India'>
                        <player>Sachin</player>
                        <runs>100</runs>
                        <wicket>4</wicket>            
            </Team>
                       
            <Team country='Austrelia'>
                        <player>smith</player>
                        <runs>10</runs>
                        <wicket>1</wicket>
            </Team>                   
</CricketTeam>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.