XML Lab Guide Questions (1)
XML Lab Guide Questions (1)
XML Questions
1. Create a well-formed XML document containing details of a car like: id,
company name, model, engine and mileage.
<?xml version="1.0" encoding="utf-8"?>
<cars>
<car id="c101">
<company>Maruti</company>
<model>Swift</model>
<engine>1248cc</engine>
<mileage>20</mileage>
</car>
<car id="c102">
<company>Hyundai</company>
<model>i20</model>
<engine>1000cc</engine>
<mileage>15</mileage>
</car>
</cars>
Output: