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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:46:06+00:00 2026-06-11T21:46:06+00:00

I have created a xml file from a dataset, but the first node is

  • 0

I have created a xml file from a dataset, but the first node is <NewDataset> i need to change that to <FormData> and i also need to add in some parameter like Platform=”Android” and Version=”488″.

Is there any way to change it while it is still a dataset or will i have to call up the file after i change it and then save it?

My knowledge of data files is minimal and i really need some help.


Current xml file

<NewDataSet>
  <FieldData>
    <property_details_gps_location>-29.77861, 31.008617</property_details_gps_location>
    <property_details_address_address1>27 MANJEE</property_details_address_address1>
    <property_details_address_address2>KENVILLE</property_details_address_address2>
    <property_details_address_city>ETHEKWINI</property_details_address_city>
    <property_details_address_state>KWAZULU NATAL</property_details_address_state>
  </FieldData>
</NewDataSet>

What i hope to achive:

<FormData Platform="Android" PlatformVersion="73" Version="488" DataVersion="1" Description="Investec - Res" FormId="d617a5e8-b49b-4640-9734-bc7a2bf05691" FileId="bce3a788-6725-4ce2-b965-1b55c6e7cc95" EncryptionVerification="" CreatedBy="Shaunm" EditedBy="Shaunm">
  <FieldData>
    <property_details_gps_location>-29.77861, 31.008617</property_details_gps_location>
    <property_details_address_address1>27 MANJEE</property_details_address_address1>
    <property_details_address_address2>KENVILLE</property_details_address_address2>
    <property_details_address_city>ETHEKWINI</property_details_address_city>
    <property_details_address_state>KWAZULU NATAL</property_details_address_state>
  </FieldData>
</FormData>
  • 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-11T21:46:07+00:00Added an answer on June 11, 2026 at 9:46 pm

    You can easily modify/add elements/attributes via LINQ to XML.

     XDocument doc = XDocument.Parse(dataSetObject.GetXml());
     doc.Root.Name  = "FormData ";
     doc.Root.Add(new XAttribute("Platform", "Android"));
     ...
     doc.Save("sample.xml");
    

    To list the child nodes,

    foreach (XElement element in doc.Root.Element("FieldData").Descendants())
     {
       Console.WriteLine(element.Name + " : " + element.Value );
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created a xml file from database. this xml file i need to
I have created XML file,but I can't view it/output it.I know there is no
I have a dataset that I read in from a complex xml structure.... here
i have created an xml file from my c# application i want to use
I have created this php script, to create an xml-file from my database: <?php
I have a dynamically created xml file that contains a record with five descriptor
I have this xml file that i have created pragmatically using C# :- <Years>
I read that context.xml file (in Tomcat) is application specific. I have created two
I have created a custom listview that is populated using a row.xml file. Each
I have created an xml file like this: <?xml version=1.0 encoding=utf-8?> <ListView xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent

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.