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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:23:16+00:00 2026-05-13T16:23:16+00:00

I’m co-developing a vehicle information system that reads and presents data from a communication

  • 0

I’m co-developing a vehicle information system that reads and presents data from a communication bus. Signaling information on the bus is stored on some kind of database (from the dark ages i’d guess) from which it’s only possible to get data out of by extracting a xml-snapshot. Since that wasn’t bad enough, someone in upper management thought it was a great idea to treat different parts of the system as different projects (it looked really nice in the organizational chart) which lead to more databases…

It is now my responsibility to merge these xml-files into one and before I start banging my head against the wall i thought it would be a good idea to check with you geniuses if there’s any neat solution to my problem.

The structure of the xml is somewhat like this:

<data>
  <frame ID="1001">
    <attributes>
      <name>Frame 1</name>
      <description>The first frame</description>
    </attributes>
    <references/>
  </frame>
  <signal ID="1002">
    <attributes>
      <signalid>1</signalid>
      <name>Signal 1</name>
    </attributes>
    <references>
      <frame ID="1001"/>
    </references>
  </signal>
</data> 

All entities (signals, frames etc.) lies directly under the root element and there can be several of each. The ID is generated when the file is extracted from the database and changes everytime. The only purpose of the id is to link different entities together, “Signal 1” belongs to “Frame 1” and so on…

The unique identifier of an entity differ between the entities but it’s often an id, name or combination of some elements.

Since there is an overlap between the projects the second xml-file can look like this:

<data>
  <frame ID="2001">
    <attributes>
      <name>Frame 1</name>
      <description>The first of many frames</description>
    </attributes>
    <references/>
  </frame>
  <signal ID="2002">
    <attributes>
      <signalid>1</signalid>
      <name>Signal 1</name>
    </attributes>
    <references>
      <frame ID="2001"/>
    </references>
  </signal>
  <signal ID="2003">
    <attributes>
      <signalid>2</signalid>
      <name>Signal 2</name>
    </attributes>
    <references>
      <frame ID="2001"/>
    </references>
  </signal>
</data>

As you can see there is now multiple instances of “Frame 1” and “Signal 1” but the second file adds another signal to “Frame 1”.

What i’m trying to achieve is to add “Signal 2” to the first file and update the frame reference to 1001.

The best solution i’ve come up with so far is to do a plain merge (using linq), search the whole file for duplicates, store all related ID’s and last but not least replace the deleted ID’s with the correct ones.

I’m pretty sure there’s no oneliner-solution to my problem (since the problem originates from the crappy database structure), but it’d be stupid not to ask.

  • 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-13T16:23:16+00:00Added an answer on May 13, 2026 at 4:23 pm

    Well as I suppose there was not any fancy solution too my problem. I ended up using the “solution” I described in the question.

    Well, on to bigger things!

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

Sidebar

Related Questions

No related questions found

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.