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 8575123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:37:28+00:00 2026-06-11T19:37:28+00:00

I am using C# to do this. OK, so this is what my XML

  • 0
  1. I am using C# to do this.
  2. OK, so this is what my XML file looks like… only there are SO much more AUCCars nodes.

    <Recordset>
    <AUCCars>
        <Web_Series>5 Series</Web_Series>
            <Body_Desc>Sedan</Body_Desc>
            <Model_Type>550i (E60)</Model_Type>
            <Model_Year>2006</Model_Year>
            <Ext_Colour>Alpine White III - Non-Metallic</Ext_Colour>
            <Int_Colour>Leather Dakota Black - Dakota Leather</Int_Colour>
            <Price>R 579000</Price>
            <Search_Price>579000</Search_Price>
            <Province>Gauteng</Province>
            <AucID>106288</AucID>
            <DealerID>45</DealerID>
            <DealerCode>29968</DealerCode>
            <DealerName>Lyndhurst Auto</DealerName>
            <Transmission>Automatic</Transmission>
            <AirCon>n/a</AirCon>
            <Radio>Yes</Radio>
            <PSteering>Yes</PSteering>
            <ABS>Yes</ABS>
            <Airbag>Yes</Airbag>
            <Sunroof>Yes</Sunroof>
            <Km>11500</Km>
            <Motorplan>Yes</Motorplan>
            <Warranty>N</Warranty>
            <BodyNo>6CR76051</BodyNo>
            <ModelOEM>NB52</ModelOEM>
            <ColourOEM>300</ColourOEM>
            <TrimOEM>LCSW</TrimOEM>
            <WheelsOEM></WheelsOEM>
            <Sold>N</Sold>
            <Notes> </Notes>
            <Moreoptions>Automatic Transmission with Steptronic
                         Interior trim finishers, Fine-wood, Poplar Grain Brown, high-gloss
                         Park Distance Control (PDC),front and rear</Moreoptions>
            <Picture>\Vehicle_Pictures\E60\LI\frontview_big_P0300.jpg</Picture>
            <PictureRear>\Vehicle_Pictures\E60\LI\rearview_big_P0300.jpg</PictureRear>
            <Interior>\Vehicle_Pictures\E60\LI\Interior\big_Fo_LCSW.jpg</Interior>
    </AUCCars>
    <AUCCars>
            <Web_Series>5 Series</Web_Series>
            <Body_Desc>Sedan</Body_Desc>
            <Model_Type>550i (E60)</Model_Type>
            <Model_Year>2006</Model_Year>
            <Ext_Colour>Black Sapphire - Metallic</Ext_Colour>
            <Int_Colour>Amethyst Black Exclusive Leather - Exclusive Leather</Int_Colour>
            <Price>R 529990</Price>
            <Search_Price>529990</Search_Price>
            <Province>KwaZulu Natal</Province>
            <AucID>111922</AucID>
            <DealerID>17</DealerID>
            <DealerCode>2485</DealerCode>
            <DealerName>Supertech</DealerName>
            <Transmission>Automatic</Transmission>
            <AirCon> Yes</AirCon>
            <Radio>Yes</Radio>
            <PSteering>Yes</PSteering>
            <ABS>Yes</ABS>
            <Airbag>Yes</Airbag>
            <Sunroof>n/a</Sunroof>
            <Km>7000</Km>
            <Motorplan>n/a</Motorplan>
            <Warranty>N</Warranty>
            <BodyNo>6CR75567</BodyNo>
            <ModelOEM>NB52</ModelOEM>
            <ColourOEM>475</ColourOEM>
            <TrimOEM>LDRH</TrimOEM>
            <WheelsOEM></WheelsOEM>
            <Sold>N</Sold>
            <Notes> </Notes>
            <Moreoptions>Automatic Transmission with Steptronic
                         Electric Rear Screen Roller Sun Blind with manual Side Blinds
                         Interior trim finishers, Fine-wood, Poplar Grain Brown, high-gloss
                         High Beam Assist
                         Head-up display (not with SA354)</Moreoptions>
            <Picture>\Vehicle_Pictures\E60\LI\frontview_big_P0475.jpg</Picture>
            <PictureRear>\Vehicle_Pictures\E60\LI\rearview_big_P0475.jpg</PictureRear>
            <Interior>\Vehicle_Pictures\E60\LI\Interior\big_Fo_LDRH.jpg</Interior>  
    </AUCCars>
    <Recordset>
    
  3. I need to fill combo boxes for Series, Model, and Year.

  4. This i got right. When I compile the program, it loads all the series into the series
  5. combo box.
  6. When I selected a series, it automatically loads all the models into the models combo
  7. box. When I selected a model, it automatically loads the years accordingly.

  8. Now I need to display data according to selection.

  9. eg. I selected “5 Series” for the series combo box, “550i (E60)” for the model combo 11. box, and “2006” for the year combo box.

  10. How do I display all the data in that specific node according to my selection 13. in a list box?

  • 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-06-11T19:37:29+00:00Added an answer on June 11, 2026 at 7:37 pm

    I hope I did get you right… I created a small sample form. On SelectedIndexChanged of a comboBox I will show the filtered aucCars. ComboBoxes gets their data from xml file according to given details in question (Web_Series, Model_Type, Model_Year - distinct)

    // get data from file
    XElement aucCars = XElement.Load("data.xml");
    private void cmbSeries_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (cmbSeries.SelectedItem != null)
        {
            string currentSeries = cmbSeries.SelectedItem.ToString();
            var models = (from a in aucCars.Elements()
                            where a.Element("Web_Series").Value == currentSeries
                            select a.Element("Model_Type").Value).Distinct().ToList();
            cmbModel.DataSource = models;
        }
        showAucCars();
    }
    private void cmbModel_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (cmbModel.SelectedItem != null)
        {
            string currentSeries = cmbSeries.SelectedItem.ToString();
            string currentModel = cmbModel.SelectedItem.ToString();
    
            var years = (from a in aucCars.Elements()
                            where a.Element("Web_Series").Value == currentSeries &&
                            a.Element("Model_Type").Value == currentModel
                            select a.Element("Model_Year").Value).Distinct().ToList();
            cmbYear.DataSource = years;
        }
        showAucCars();
    }
    private void cmbYear_SelectedIndexChanged(object sender, EventArgs e)
    {
        showAucCars();
    }
    private void frmXmlLoad_Load(object sender, EventArgs e)
    {            
        var series = (from a in aucCars.Elements()
                    select a.Element("Web_Series").Value).Distinct().ToList();
        cmbSeries.DataSource = series;
    }
    private void showAucCars()
    {
        var filterCars = aucCars.Elements();
        if (cmbSeries.SelectedItem!=null)
        {
            string currentSeries = cmbSeries.SelectedItem.ToString();
            filterCars = from a in filterCars
                            where a.Element("Web_Series").Value == currentSeries
                            select a;
        }
        if (cmbSeries.SelectedItem != null)
        {
            string currentModel = cmbModel.SelectedItem.ToString();
            filterCars = from a in filterCars
                            where a.Element("Model_Type").Value == currentModel
                            select a;
        }
        if (cmbSeries.SelectedItem != null)
        {
            string currentYear = cmbYear.SelectedItem.ToString();
            filterCars = from a in filterCars
                            where a.Element("Model_Year").Value == currentYear
                            select a;
        }
        // will show all the element data 
        // add a new linq stmt to select specific elements
        listBox1.DataSource = filterCars.ToList();            
    }
    

    Within showAucCars() I filter according to selection in comboBoxes and show result in listBox. In case you want to display a specific element in listbox, add a new linq stmt and select the according element(s).

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

Sidebar

Related Questions

In layout xml file, I set properties using @string like this: <com.hardpass.MyCustomComponent android:layout_width=fill_parent android:layout_height=wrap_content
I am trying to dynamically create an XML file using php like this: header
I would like copy just file.xml without folder structure using overlays like this: <overlays>
I have an xml file which looks like this: <section> <title> title of section
I am using an XML file to store the values. This XML file can
I'm trying to parse an xml file with PHP. I'm using this code and
I have student.xml file and am parsing this file using SAX Parser and now
Using this xslt file found on this blog to pretty print xml using Nokogiri,
Hi I use this code to save an xml file using (IsolatedStorageFile myIsolatedStorage =
I want to parse a xml file using xquery in Ruby, I found this

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.