Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 389937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:54:56+00:00 2026-05-12T15:54:56+00:00

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>

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:54:56+00:00Added an answer on May 12, 2026 at 3:54 pm

    if your XML file will have always this structre you can use simply:

            string version = "";
            int n = 0;
    
            using (DataSet ds = new DataSet())
            {
                ds.ReadXml(@"sample.xml");
                if(ds.Tables.Contains("ManagedObject") 
                   && ds.Tables["ManagedObject"].Rows.Count > n)
                {
                    ver = ds.Tables["ManagedObject"].Rows[n]["version"].ToString();
                }
            }
    

    to get the n-th ManagedObject version.

    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:

            listView1.Items.Add(version);
    

    if “version” is to be added to an existing item in a secondary column use:

            listview1.Items[n].SubItems.Add(version);
    

    you can look here for further details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple xml file that looks like this: <?xml version=1.0 encoding=UTF-8 standalone=yes
I have been provided an XSD and a sample Xml file that contains the
I have my sample XML file: <?xml version=1.0 encoding=utf-8 ?> <contacts> <contact contactId=2> <firstName>Barney</firstName>
Ihave an xml file sample.xml i need to display number from above xml file
I have a sample xml file created using Editplus( in windows). < ?xml version=1.0
This is a sample of the XML file : <Nodes version=1> <Node name=root> <Node
I have a bit of xml file named Sample.xml which is shown below <?xml
I have this simple XML file : <?xml version=1.0 encoding=utf-8 ?> <Artists> <artist artistId=1>
Here's an example of an XML file created in InfoPath: <?xml version=1.0 encoding=UTF-8?> <?mso-infoPathSolution
Suppose I have the following XML file, and I want to use PowerShell (version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.