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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:51:46+00:00 2026-06-05T04:51:46+00:00

I am stuck on a project which needs to exchange data between two programs

  • 0

I am stuck on a project which needs to exchange data between two programs who have different coontrol files.
Program A just creates a a XML File whereas Program B needs the input as an array with two “columns” – but how do can I do the conversion?

Example:
The xml looks like:

` <Presentation>
  <Options Name="1">
  <Output>MyOutPut</Output>
    <Slides Name="1">
    <Template>Template2</Template> 
      <Diagram Name="Name4">
         <More Elements...>
      </Diagram>
    </Slides>
    </Options>
  </Presentation>`

The output should like this:

 `
    Presentation ""
    Options 1
    Output Myoutput
    Slides 1
    Template Template2

...
`

But how can I achieve this? I am using vb.net and LINQ and have no idea how to solve this problem. I tried some LINQ queries but I get only indivudal nodes or attributes so I think it would be better to try a different idea.
Any advice would be appreciated!

  • 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-05T04:51:48+00:00Added an answer on June 5, 2026 at 4:51 am

    Unfortunatelly, I cannot provide VB code, but I hope this C# snippet will help.

    void Main()
    {
        var doc = XElement.Load(@"path-to-the-file");
    
        doc.DescendantsAndSelf()
           .Select(ElementSelector).Dump();
    }
    
    private static KeyValuePair<string, string> ElementSelector(XElement e)
    {
        var name = e.Name.ToString();
        var value = String.Empty;
        if (e.Descendants().Any())
        {
            if (e.Attributes().Any())
            {
                value = e.Attributes().First().Value;
            }
        }
        else
        {
            value = e.Value;
        }
        return new KeyValuePair<string, string>(name, value);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've stuck myself in a c++ project under linux ,for which I get an
I have an Android project that uses a library project (all of which I
I have an upcoming project in which a core requirement will be to mutate
I have spent the weekend working on a personal project and got stuck here.
I have been stuck in quite awkward situation in my program. The case is
I have a small project which will use iPad as an information kiosk for
hello all i am working on a project in which i have a webpage
Hey, I'm really stuck with my project here... I need to know when any
Im stuck with this little project in C# but basically my problem is this:
This was my first Sinatra project - link shortener but I am stuck with

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.