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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:06:19+00:00 2026-06-17T14:06:19+00:00

I have read many questions on SO about this topic but I can seem

  • 0

I have read many questions on SO about this topic but I can seem to related to what I am trying to do. Basically I am calling a web service to return information about a Vehicle Identification Number (VIN). It returns an xml stream that looks like this:

<VINquery Version="1.0.0" Date="5/25/2003">
  <VIN Number="1HGES15501Lxxxxxx" Status="SUCCESS">
    <Vehicle VINquery_Vehicle_ID="23261" Model_Year="2001" Make="Honda" Model="Civic" Trim_Level="LX Sedan">
      <Item Key="VINquery Vehicle ID" Value="23261" Unit=""/>
      <Item Key="Model Year" Value="2001" Unit=""/>
      <Item Key="Make" Value="Honda" Unit=""/>
      <Item Key="Model" Value="Civic" Unit=""/>
      <Item Key="Trim Level" Value="LX Sedan" Unit=""/>
      <Item Key="Manufactured in" Value="UNITED STATES" Unit=""/>
      <Item Key="Production Seq. Number" Value="xxxxxx" Unit=""/>
      <Item Key="Body Style" Value="SEDAN 4-DR" Unit=""/>
      <Item Key="Engine Type" Value="1.7L L4 SOHC 16V" Unit=""/>
      <Item Key="Transmission-short" Value="5M OD" Unit=""/>
      <Item Key="Transmission-long" Value="5-Speed Manual Overdrive" Unit=""/>
      <Item Key="Driveline" Value="FWD" Unit=""/>
      <Item Key="Tank" Value="13.20" Unit="gallon"/>
      <Item Key="Fuel Economy-city" Value="30 - 32" Unit="miles/gallon"/>
      <Item Key="Fuel Economy-highway" Value="38 - 39" Unit="miles/gallon"/>
      <Item Key="Anti-Brake System" Value="Non-ABS" Unit=""/>
      <Item Key="Steering Type" Value="R&P" Unit=""/>
      <Item Key="Standard Seating" Value="5" Unit=""/>
      <Item Key="Optional Seating" Value="No data" Unit=""/>
      <Item Key="Length" Value="174.60" Unit="in."/>
      <Item Key="Width" Value="67.50" Unit="in."/>
      <Item Key="Height" Value="56.70" Unit="in."/>
    </Vehicle>
  </VIN>
</VINquery>

I want to take that data and parse it out for each key/value.
This is my code I am using the get the xml data:

private string baseURL = "http://ws.vinquery.com/restxml.aspx?accessCode=xxxxxx&vin=xxxxxxxxx";
private string reportType = "&reportType=2";

public XmlDocument ExplodeVIN(string strVIN)
{
   DataTable dt = new DataTable();

   string url = baseURL + strVIN + reportType;

   HttpWebRequest req = WebRequest.Create(url) as HttpWebRequest;

   XmlDocument xmlDoc = new XmlDocument();
   using (HttpWebResponse resp = req.GetResponse() as HttpWebResponse)
   {
     xmlDoc.Load(resp.GetResponseStream());
   }
   return xmlDoc;
}

After I get the xmlDoc I am not sure what to do next.

Thanks for your kind assistance.

  • 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-17T14:06:20+00:00Added an answer on June 17, 2026 at 2:06 pm

    You can parse xml to Dictionary<string, string> with Linq to Xml:

    var xdoc = XDocument.Parse(xml);
    var items = xdoc.Descendants("Item")
                    .ToDictionary(i => (string)i.Attribute("Key"),
                                  i => (string)i.Attribute("Value"));
    

    Usage:

    string driveline = items["Driveline"];
    

    Or

    foreach(var kvp in items)
        // use key value pair
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read many questions about Android, J2ME and RecordStore , but I still
I have read many questions about the facebook login but until not I didnt
I have seen many questions about the above topics but none that address this.
I have read many questions and tutorials about this, I couldn't find a case
I already read it so many questions and answers about it but I can't
First of all, I have read through many S.O. questions regarding this topic and
I have read many answers to questions about dynamically resizing NSWindows and nothing has
I know there are plenty of questions here already about this topic (I've read
I'm using Delphi XE2 with FireMonkey. I have read many other questions about MD5
ok I am well aware there are many other questions about this, but I

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.