prince raj

prince raj

  • NA
  • 88
  • 44.9k

xml to array

Jun 23 2014 3:41 AM
i have following xml file
 
<?xml version="1.0" encoding="utf-8" ?>
<Top10>
<index id="0">
<A>0</A>
<B>AIRCRAFT</B>
<C>PILOTS(S)</C>
<D>DATE</D>
<E>LOCATION</E>
<F>TOP SPEED </F>
<G>(mph)</G>
</index>
<index id="1">
<A>1</A>
<B>Lockheed SR-71 Blackbird</B>
<C>Eldon W joersz, Georgi T Morgan</C>
<D>Jul 28, 1976 </D>
<E>Beale Air Force Base, CA (USA)</E>
<F>3529.6</F>
<G>2193.2</G>
</index>
<index id="2">
<A>2</A>
<B>Lockheed YF-12A</B>
<C>Robert L Stephens, Daniel Andre</C>
<D>May 1, 1965</D>
<E>Edwards Air Force Base, CA (USA)</E>
<F>3331.5</F>
<G>2070.1</G>
</index>
</Top10>
In First 0 is the title of row
and index 1,2...10 is row
now i need in string array format like
string[] title = new title[7];
title = {"0", "AIRCRAFT", "PILOTS(S)", "DATE", "LOCATION", "TOP SPEED", "(mph)");
string[] 1 = new 1[7];
1 = {"1", "Lockheed SR-71 Blackbird", "Eldon W joersz, Georgi T Morgan", "Jul 28, 1976", "Beale Air Force Base, CA (USA)", "3529.6", "2193.2");
.
.
And it not fixed that compulsory 7 rows in all other xml file.
so how can i ?

Answers (4)