如何将数据从xml绑定到listview [英] how to bind data from xml to a listview
本文介绍了如何将数据从xml绑定到listview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个xml
i have a xml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getApplicantResponse xmlns:ns2="http://ws.mcint/">
<return>
<applicantTests>
<groupCode>HIV</groupCode>
<mcApplicantTestsPK>
<episodeNo>1</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>1</testNo>
</mcApplicantTestsPK>
<specimenNo>401001374</specimenNo>
<testCode>ANTI-HIV</testCode>
<mcApplicantTestsPK>
<episodeNo>1</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>1</testNo>
</mcApplicantTestsPK>
<groupCode>HIV</groupCode>
<testCode>ANTI-HIV</testCode>
<specimenNo>401001374</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>XG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>1</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>2</testNo>
</mcApplicantTestsPK>
<specimenNo>0</specimenNo>
<testCode>CXR</testCode>
<mcApplicantTestsPK>
<episodeNo>1</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>2</testNo>
</mcApplicantTestsPK>
<groupCode>XG1</groupCode>
<testCode>CXR</testCode>
<specimenNo>0</specimenNo>
</applicantTests>
<applicationDetails>
<mcApplicationDetailsPK>
<episodeNo>1</episodeNo>
<mcNo>1000001404</mcNo>
<typeCode>WRK</typeCode>
</mcApplicationDetailsPK>
<mcApplicationDetailsPK>
<episodeNo>1</episodeNo>
<mcNo>1000001404</mcNo>
<typeCode>WRK</typeCode>
</mcApplicationDetailsPK>
</applicationDetails>
</episodes>
<episodes>
<mcEpisodesPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
</mcEpisodesPK>
<visaType>04</visaType>
<visaNo>26581802115</visaNo>
<passportNo>2091187</passportNo>
<maritalStatus>U</maritalStatus>
<pregnancyIndicator>N</pregnancyIndicator>
<xrayRequired>Y</xrayRequired>
<occupationCode>574</occupationCode>
<sponsorCode>OTH</sponsorCode>
<applicantTests>
<groupCode>LG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>1</testNo>
</mcApplicantTestsPK>
<specimenNo>101327859</specimenNo>
<testCode>ANTI-HCV</testCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>1</testNo>
</mcApplicantTestsPK>
<groupCode>LG1</groupCode>
<testCode>ANTI-HCV</testCode>
<specimenNo>101327859</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>LG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>2</testNo>
</mcApplicantTestsPK>
<specimenNo>101327859</specimenNo>
<testCode>ANTI-HIV</testCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>2</testNo>
</mcApplicantTestsPK>
<groupCode>LG1</groupCode>
<testCode>ANTI-HIV</testCode>
<specimenNo>101327859</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>XG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>3</testNo>
</mcApplicantTestsPK>
<specimenNo>0</specimenNo>
<testCode>CXR</testCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>3</testNo>
</mcApplicantTestsPK>
<groupCode>XG1</groupCode>
<testCode>CXR</testCode>
<specimenNo>0</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>LG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>4</testNo>
</mcApplicantTestsPK>
<specimenNo>101327859</specimenNo>
<testCode>HBSAG</testCode>
<mcApplicantTestsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>4</testNo>
</mcApplicantTestsPK>
<groupCode>LG1</groupCode>
<testCode>HBSAG</testCode>
<specimenNo>101327859</specimenNo>
</applicantTests>
<applicationDetails>
<mcApplicationDetailsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<typeCode>RFL</typeCode>
</mcApplicationDetailsPK>
<mcApplicationDetailsPK>
<episodeNo>2</episodeNo>
<mcNo>1000001404</mcNo>
<typeCode>RFL</typeCode>
</mcApplicationDetailsPK>
</applicationDetails>
</episodes>
<episodes>
<mcEpisodesPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
</mcEpisodesPK>
<visaType>04</visaType>
<visaNo>29114405896</visaNo>
<passportNo>29114405896</passportNo>
<maritalStatus>U</maritalStatus>
<pregnancyIndicator>N</pregnancyIndicator>
<xrayRequired>Y</xrayRequired>
<occupationCode>757</occupationCode>
<sponsorCode>OTH</sponsorCode>
<applicantTests>
<groupCode>PRF</groupCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>1</testNo>
</mcApplicantTestsPK>
<specimenNo>651045862</specimenNo>
<testCode>ANTI-HBCT</testCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>1</testNo>
</mcApplicantTestsPK>
<groupCode>PRF</groupCode>
<testCode>ANTI-HBCT</testCode>
<specimenNo>651045862</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>PRF</groupCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>2</testNo>
</mcApplicantTestsPK>
<specimenNo>651045862</specimenNo>
<testCode>ANTI-HBS</testCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>2</testNo>
</mcApplicantTestsPK>
<groupCode>PRF</groupCode>
<testCode>ANTI-HBS</testCode>
<specimenNo>651045862</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>LG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>3</testNo>
</mcApplicantTestsPK>
<specimenNo>101860252</specimenNo>
<testCode>ANTI-HCV</testCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>3</testNo>
</mcApplicantTestsPK>
<groupCode>LG1</groupCode>
<testCode>ANTI-HCV</testCode>
<specimenNo>101860252</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>LG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>4</testNo>
</mcApplicantTestsPK>
<specimenNo>101860252</specimenNo>
<testCode>ANTI-HIV</testCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>4</testNo>
</mcApplicantTestsPK>
<groupCode>LG1</groupCode>
<testCode>ANTI-HIV</testCode>
<specimenNo>101860252</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>XG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>5</testNo>
</mcApplicantTestsPK>
<specimenNo>0</specimenNo>
<testCode>CXR</testCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>5</testNo>
</mcApplicantTestsPK>
<groupCode>XG1</groupCode>
<testCode>CXR</testCode>
<specimenNo>0</specimenNo>
</applicantTests>
<applicantTests>
<groupCode>LG1</groupCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>6</testNo>
</mcApplicantTestsPK>
<specimenNo>101860252</specimenNo>
<testCode>HBSAG</testCode>
<mcApplicantTestsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<testNo>6</testNo>
</mcApplicantTestsPK>
<groupCode>LG1</groupCode>
<testCode>HBSAG</testCode>
<specimenNo>101860252</specimenNo>
</applicantTests>
<applicationDetails>
<mcApplicationDetailsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<typeCode>BBL</typeCode>
</mcApplicationDetailsPK>
<mcApplicationDetailsPK>
<episodeNo>3</episodeNo>
<mcNo>1000001404</mcNo>
<typeCode>BBL</typeCode>
</mcApplicationDetailsPK>
</applicationDetails>
</episodes>
<contact>
<contact>5919200</contact>
<mcApplicantContactsPK>
<contactCode>WK</contactCode>
<mcNo>1000001404</mcNo>
</mcApplicantContactsPK>
<remarks>5919200</remarks>
<mcApplicantContactsPK>
<contactCode>WK</contactCode>
<mcNo>1000001404</mcNo>
</mcApplicantContactsPK>
<contact>5919200</contact>
<remarks>5919200</remarks>
</contact>
</return>
</ns2:getApplicantResponse>
</S:Body>
</S:Envelope>
how could i bind group code test code to a list view
how could i bind group code test code to a list view
推荐答案
see this it may help you
http://stackoverflow.com/questions/14890767/pull-data-from-xml-file-to-list-view-in-c-sharp[^]
see this it may help you
http://stackoverflow.com/questions/14890767/pull-data-from-xml-file-to-list-view-in-c-sharp[^]
这篇关于如何将数据从xml绑定到listview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文