简体   繁体   中英

how to display the below xml in the flex datagrid

<rows>
−
<row rowno="1">
−
<row-value>
<colno>1</colno>
<value>1</value>
</row-value>
−
<row-value>
<colno>2</colno>
<value>sel</value>
</row-value>
−
<row-value>
<colno>3</colno>
<value>select * from qt_query</value>
</row-value>
−
<row-value>
<colno>4</colno>
<value>kishore</value>
</row-value>
−
<row-value>
<colno>5</colno>
<value>2009-04-10 00:00:00.0</value>
</row-value>
−
<row-value>
<colno>6</colno>
</row-value>
−
<row-value>
<colno>7</colno>
</row-value>
</row>
−
<row rowno="2">
−
<row-value>
<colno>1</colno>
<value>2</value>
</row-value>
−
<row-value>
<colno>2</colno>
<value>sel12345</value>
</row-value>
−
<row-value>
<colno>3</colno>
<value>select * from qt_query</value>
</row-value>
−
<row-value>
<colno>4</colno>
<value>kishore</value>
</row-value>
−
<row-value>
<colno>5</colno>
<value>2009-04-10 00:00:00.0</value>
</row-value>
−
<row-value>
<colno>6</colno>
<value>krajkumard</value>
</row-value>
−
<row-value>
<colno>7</colno>
<value>2010-05-21 00:00:00.0</value>
</row-value>
</row>
−
<row rowno="3">
−
<row-value>
<colno>1</colno>
<value>3</value>
</row-value>
−
<row-value>
<colno>2</colno>
<value>sele123</value>
</row-value>
−
<row-value>
<colno>3</colno>
−
<value>
select * from cache where %2scache_name% = ? and %1icache_type% = ?
</value>
</row-value>
−
<row-value>
<colno>4</colno>
<value>krajkumard</value>
</row-value>
−
<row-value>
<colno>5</colno>
<value>2010-05-21 00:00:00.0</value>
</row-value>
−
<row-value>
<colno>6</colno>
</row-value>
−
<row-value>
<colno>7</colno>
</row-value>
</row>
−
<row rowno="4">
−
<row-value>
<colno>1</colno>
<value>4</value>
</row-value>
−
<row-value>
<colno>2</colno>
<value>upd</value>
</row-value>
−
<row-value>
<colno>3</colno>
<value>select * from qt_qtool where %sname=?%</value>
</row-value>
−
<row-value>
<colno>4</colno>
<value>krajkumard</value>
</row-value>
−
<row-value>
<colno>5</colno>
<value>2010-05-31 00:00:00.0</value>
</row-value>
−
<row-value>
<colno>6</colno>
</row-value>
−
<row-value>
<colno>7</colno>
<value>2010-06-07 00:00:00.0</value>
</row-value>
</row>
−
<row rowno="5">
−
<row-value>
<colno>1</colno>
<value>5</value>
</row-value>
−
<row-value>
<colno>2</colno>
<value>Pron_errors</value>
</row-value>
−
<row-value>
<colno>3</colno>
<value>select * from proanalyzer_errors</value>
</row-value>
−
<row-value>
<colno>4</colno>
<value>tjothy</value>
</row-value>
−
<row-value>
<colno>5</colno>
<value>2010-06-07 00:00:00.0</value>
</row-value>
−
<row-value>
<colno>6</colno>
</row-value>
−
<row-value>
<colno>7</colno>
</row-value>
</row>
</rows>
<mx:DataGrid dataProvider="{yourXml}"
 <mx:columns>
   <mx:Array> 
    <mx:DataGridColumn columnName="colno" headerText="Column Number" />
    <mx:DataGridColumn columnName="value" headerText="Value" />
   </mx:Array>
 </mx:columns> 
</mx:DataGrid>

See, eg: http://www.bpurcell.org/blog/index.cfm?mode=entry&entry=1020

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM