Sumit Kumawat

Sumit Kumawat

  • NA
  • 454
  • 414.8k

Create XML using XmlTextWriter in c#?

Jan 4 2013 12:34 AM

Hi all ,

i want to create XML like below using XmlTextWriter and also want to read using XmlTextReader in my C# application.

<?xml version="1.0" encoding="utf-8"?>
<VehicleDetail>
  <CAR>
    <Company>Ford</Company>
    <Model>Figo</Model>
    <CarNumber>RJ27-CB-8551</CarNumber>
    <Colour>White</Colour>
  </CAR>
  <BIKE>
    <Company>Bajaj</Company>
    <Model>Pulsur</Model>
    <BikeNumber>RJ27-SE-1551</BikeNumber>
    <Colour>Black</Colour>
    <CC>180</CC>
  </BIKE>
</VehicleDetail>

plsease help me to create and read this. :)

thanks in advance :)


Answers (5)