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

  • Home
  • SEARCH
  • 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 4024102
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:40:48+00:00 2026-05-20T10:40:48+00:00

Sorry if the description is poor, but I don’t know how else to put

  • 0

Sorry if the description is poor, but I don’t know how else to put this…
But here is an example of the XML structure

<?xml version=”1.0” encoding=”UTF-8”>
<Response xmlns="http://www.blah.com">
  <searchResult>
    <info>
      <firstName>John</firstName>
      <lastName>Doe</lastName>
      <totalCharges>100.00</totalCharges>
      <nonPaymentCode>99999</nonPaymentCode>
    </info>
    <info>
      <firstName>Susan</firstName>
      <lastName>Doe</lastName>
      <totalCharges>1000.00</totalCharges>
      <errorCodes>
        <errorCode>12345</errorCode>
      </errorCodes>
    </info>
    <info>
      <firstName>Peter</firstName>
      <lastName>Doe</lastName>
      <totalCharges>10.00</totalCharges>
      <errorCodes>
        <errorCode>12345</errorCode>
        <errorCode>54321</errorCode>
        <errorCode>85246</errorCode>
      </errorCodes>
    </info>
  </searchResult>
</claimInquiryResponse>

I have transformed this into a dataset in order to access the information as a datatable.
But my problem is trying to get the errorCodes. I was trying to figure this out by checking the relationship of the tables. Because I have to figure out what error codes are associated with what person, in order to display them properly. I cannot control the XML structure, and everything is optional in order to reduce excess bandwidth so changing it is not an option at this point. But here is an example of what I have done:

For Each rel As DataRelation In ds.Tables(i).ChildRelations
    If rel.Nested Then
        Dim temp As New DataTable
        temp = rel.ChildTable
        For Each relationship As DataRelation In temp.ChildRelations
            For Each row As DataRow In relationship.ChildTable.Rows
                For Each column As DataColumn In relationship.ChildTable.Columns
                    rowValues &= column.ColumnName & "-" & row(column.ColumnName) & "-" & relationship.RelationName & vbCrLf
                Next
            Next
        Next
    End If
Next

This gives me the actual values of the data inside of errorCodes table. but I can’t figure out how to link it back to what row/person it was associated with. The indexes the relationship generate are built off of their occurance (for instance the error codes for susan will be 0 and for peter it will be 1), not relating to their location in the XML.

I am either doing this wrong or looking at this data incorrectly.
I know I can use a XML reader to get all this, but the data is already in the dataset, and I feel like learning something new. so only suggest it as a last resort please.

thanks in advance!

  • 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-20T10:40:49+00:00Added an answer on May 20, 2026 at 10:40 am

    I ended up just reading through the XML checking the node name and building a separate table for the error codes, and when I found the end element for info I spat out the tables individually.

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

Sidebar

Related Questions

Sorry if that description isn't clear...wasn't sure how else to put it. I have
Sorry for this not being a real question, but Sometime back i remember seeing
Sorry for my ignorance here, but when I hear the word webserver, I immediately
Sorry if this sounds like a really stupid question, but I need to make
Greetings, everyone: Firstly, sorry that my Flow description is long winded, but I think
Sorry guys if this is a lame question, but the examples i found dont
Sorry if the title is poorly descriptive, but I can't do better right now
Sorry for the basic question - I'm a .NET developer and don't have much
Sorry, I'm new to SVN and I looked around a little for this. How
Sorry for the second newbie question, I'm a developer not a sysadmin so 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.