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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:23:18+00:00 2026-06-01T15:23:18+00:00

I have a class project where I am using a VB.Net form to search

  • 0

I have a class project where I am using a VB.Net form to search the XML document based on data entered into a text box and I need to return the values of the other items in the child tags. An example of the XML info is below. In the VB form, the user enters an account number and based on the account number matching one in the XML document, the remainder of the form, name, dob, etc populates form the XML into text boxes.

I’m not sure how to code this. I have attached the XML document to the VB form code with:

    Dim doc = XDocument.Load("CreditApp.xml")
    Dim xdoc = doc.Descendants("custData").FirstOrDefault()

I have also assigned variables to the text boxes receiving the search input from the user. The search is activated by clicking on a “Search” button in the VB form.

  txtAcctNum.Text = xdoc.Element("AcctNum").Value
  txtSSN.Text = xdoc.Element("SSN").Value

XML Sample:

   <custData>
    <FName>Ben</FName>
    <LName>Dover</LName>
    <Gender>Male</Gender>
    <Address>21 Jump Street</Address>
    <City>Beverly Hills</City>
    <State>CA</State>
    <Zip>90210</Zip>
    <Phone>3108591212</Phone>
    <Email>yourex@stalkermail.com</Email>
    <SSN>000001233</SSN>
    <AcctNum>5695847185978954</AcctNum>
    <PassCode>What</PassCode>
    <AccountAvail>75000</AccountAvail>
    <AcctBal>25000</AcctBal>
    <LPmtDate>3/28/2012</LPmtDate>
    <LPmtAmt>7500</LPmtAmt>
    <CreditLimit>100000</CreditLimit>
    <IntRate>15.499</IntRate>
    <MinPayment>1250</MinPayment>
    <PmtDueDate>4/28/2012</PmtDueDate>
    <Note></Note>
  </custData>

  <custData>
    <FName>Al</FName>
    <LName>Caholic</LName>
    <Gender>Male</Gender>
    <Address>8585 Milky Way</Address>
    <City>Palm Springs</City>
    <State>CA</State>
    <Zip>90561</Zip>
    <Phone>2029867411</Phone>
    <Email>screaming@silentmail.com</Email>
    <SSN>951855589</SSN>
    <AcctNum>9812020274912689</AcctNum>
    <PassCode>Glover</PassCode>
    <AccountAvail>0</AccountAvail>
    <AcctBal>55000</AcctBal>
    <LPmtDate>4/1/2012</LPmtDate>
    <LPmtAmt>15</LPmtAmt>
    <CreditLimit>55000</CreditLimit>
    <IntRate>18.995</IntRate>
    <MinPayment>95000</MinPayment>
    <PmtDueDate>5/1/2012</PmtDueDate>
    <Note></Note>
  </custData>

Any help would be great!

  • 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-01T15:23:20+00:00Added an answer on June 1, 2026 at 3:23 pm

    Try using xml to linq i think it would work good for you

    /// custDtatas it the top wrapping element of the whole document yours can be different

    Dim q = (From c In xDoc.Descendants("custDtatas")
    From view In c.Elements("custData") 
    Where view.Element("SSN") = '000001233'
    AndAlso view.Element("AcctNum") = '5695847185978954' view).ToList()
    
            // fill the specific part of the form with specific item 
    
            For Each item As var In q
    
            Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a base class (written using C#.net) which uses datasets to pull data
I am using C# and developing a winform application. I have a project class
I have an RMI server that is using a class from another project. I
I have a class named project with the following data members. class Project {
I have a project coded in .NET Winforms. I need to implement a data-mining
In a project using NHibernate, I have this class : public class AdminVAT :
I'm using the .NET 4 framework, and I have a static class with static
I have a project using .Net 4.0, VS 2010 and Spring 1.3. Before and
I have a class called 'Article' in a project called 'MyProject.Data', which acts as
I have created a sample project using ASP.NET MVC 3 Web Application (Razor) template.

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.