Ihave an xml file sample.xml
<?xml version="1.0" standalone="yes"?>
<DataSchema xmlns="http://tempuri.org/DataSchema.xsd">
<ManagedObject>
<Label>sam</Label>
<Owner>00000000-0000-0000-0000-000000000000</Owner>
<ClassID>00000000-0000-0000-0000-000000000008</ClassID>
<DefaultApp>00000000-0000-0000-0000-000000000000</DefaultApp>
<Name>rvi</Name>
<version>9.6</version>
</ManagedObject>
</DataSchema>
i need to display 9.6 (9.6) from above xml file to the listview.I started a new windowform application. i added listview named “_listview” put its view as a “detail” mode.I added a column
there named _version
Can you give me the code to display version number in the listview column
if your XML file will have always this structre you can use simply:
to get the n-th
ManagedObjectversion.in your case you have only 1, so
n = 0.if you want to add “version” as an item that will appear in the first column of the listview:
if “version” is to be added to an existing item in a secondary column use:
you can look here for further details.