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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:01:21+00:00 2026-05-31T17:01:21+00:00

I have an xml that goes like this: <Equipment> <ModificationDate> <Data> </Data> </ModificationDate> </Equipment>

  • 0

I have an xml that goes like this:

<Equipment>
     <ModificationDate>
             <Data>
             </Data> 
     </ModificationDate>
</Equipment>

I need to add this sequence to the Data node:

<Table>
       <Name />
       <Value />
       <Number />
</Table>

The problem is that I need to add many Table nodes in the Data node. If iot was only one I would have finished it by now.

Whenever I try to add 1 table node with its elements, I do the first one correctly, but when I try to do the same to newer nodes i create the Table nodes but its elements all go to the first Table node, leaving the others empty.

That’s why I wanted to know if anyone here knows how to add the new Table node and add the elements by using the Tabel index.

Or any other way, all I need to do is to add the elements to the specific Table node that I want, keeping in mind that they’re all the same structure and keep the same name.

I’ve searched high and low and haven’t come up with an answer

EDIT:

I’ll try to explain better. I have the first xml and I need to add the second structure to the Data field. The problem is that the second structure will be repeated about 500 times inside Data.

I can add those 500 Table … but when I try to add each number/value/name to its corresponding Table it doesn’t work. I can only add number/value/name to the first Table created. That’s why, in some way I need to access each Table separately and add the elements to it, so it will keep that structure. the final xml should look something like this:

<Equipment>
     <ModificationDate>
             <Data>
                  <Table>
                       <Name />
                       <Value />
                       <Number />
                  </Table>
                  <Table>
                       <Name />
                       <Value />
                       <Number />
                  </Table>
                  <Table>
                       <Name />
                       <Value />
                       <Number />
                  </Table>
             </Data> 
     </ModificationDate>
</Equipment>

But it ends up looking like this:

<Equipment>
     <ModificationDate>
             <Data>
                  <Table>
                       <Name />
                       <Value />
                       <Number />
                       <Name />
                       <Value />
                       <Number />
                       <Name />
                       <Value />
                       <Number />
                  </Table>
                  <Table />
                  <Table />
             </Data> 
     </ModificationDate>
</Equipment>

Please help me.

  • 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-31T17:01:23+00:00Added an answer on May 31, 2026 at 5:01 pm

    It’s not entirely clear what you need, but you can always use this to get to a table element by index:

    var table = doc.Root                         // Equipment
                   .Element("ModificationData")  // ModificationData
                   .Element("Data")              // Data
                   .Elements("Table")
                   .ElementAt(index);
    
    // Now add to that element
    

    On the other hand, if you’re adding a new table node for each name/value/number, I don’t see why you would need to access them by index…

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

Sidebar

Related Questions

I have an XML that goes like this: <company> <employee name=john/> <employee name=sarah/> <employee
I have an XML that goes like this: <?xml version=1.0 encoding=utf-8 ?> <colors> <color
I have XML that looks like this: <Parameter Name=parameter name Value=parameter value /> which
So I have xml that looks like this: <todo-list> <id type=integer>#{id}</id> <name>#{name}</name> <description>#{description}</description> <project-id
lets say i have an xml file path.xml that goes like this: <paths> <path
I have a XML file that goes like this... (the XML file was taken
I have XML that looks something like this: <Root xmlns=http://widgetspecA.com/ns> ...any... <WidgetBox> <A/> <B/>
I have XML that looks like this: <ROW ref=0005631 type=04 line=1 value=Australia/> <ROW ref=0005631
I have an xml that looks like this: <Config> <A></A> <Template><B/><C/></Template> </Config> and I
I have an xml file that looks like this; <Employee> <EmployeeName>Burt Reynolds</EmployeeName> <EmployeeTitle>Bad Ass</EmployeeTitle>

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.