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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:16:22+00:00 2026-06-13T21:16:22+00:00

<Setting1> <SubSetting1>Test1</SubSetting1> <SubSetting2>Test2</SubSetting2> </Setting1> <Setting2> <SubSetting1>Test3</SubSetting1> <SubSetting2>Test4</SubSetting2> </Setting2> This is just a small example

  • 0
<Setting1>
   <SubSetting1>Test1</SubSetting1>
   <SubSetting2>Test2</SubSetting2>
</Setting1>
<Setting2>
   <SubSetting1>Test3</SubSetting1>
   <SubSetting2>Test4</SubSetting2>
</Setting2>

This is just a small example for reference to an xml document. I am trying to learn how to append an existing xml document, with out writing over the xml tag. My actual xml document has more nodes (about 40) and I am putting all of the new values (in place of Test1, Test2, ..etc) into a list. In the correct order, So I was thinking using a For loop to just write the value.

something like this?

Public Sub example (ListofSettings As List(of String))
    Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory)
    Dim myNodes, myChildren As XmlNodeList
    settingsFile.Load(SETTINGS_FILE_PATH)
    myNodes = settingsFile.GetElementsByTagName("Settings1")
For i as Integer = 0 to ListofSettings.count
For Each n As XmlNode In myNodes
        If n.Name = "Settings1" Then
            myChildren = n.ChildNodes
            For Each n1 As XmlNode In myChildren
                Select Case n1.Name
                    Case "SubSetting1"
                        writer.WriteElementString(**DONT WANT TO CHANGE TAG NAME**, ListofSettings.Item(i))
End Select
Next
End if    
Next
  • 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-13T21:16:24+00:00Added an answer on June 13, 2026 at 9:16 pm

    Use Xmldocument.SelectSingleNode and change the innerXml of the node that you want. See MSDN for an example

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

Sidebar

Related Questions

I have a xml structure like this: <Items> <Configuration> <ConfigurationSetting>Setting1</ConfigurationSetting> <ConfigurationSetting>Setting2</ConfigurationSetting> </Configuration> <MetaData> ...
I have this in a web.config : <MySection> <Setting1 Value=10 /> <Setting2 Value=20 />
Right now, I'm currently serializing a class like this: class Session { String setting1;
I currently have: string settings = setting1:value1;setting2:value2; string[] pair; foreach(string setting in settings.Split(';')) {
(function($) { $.fn.myFunction = function(config) { var defaults = { setting1: 'myDiv', setting2: ''
I would like to do something like this : app.config : <?xml version=1.0 encoding=utf-8
I have an app.config file, with app settings like this: <appSettings> <add key=setting1 value=1/>
I have a bit of StructureMap config like so: x.ForConcreteType<OrderProcessor>().Configure .Ctor<string>(param1).EqualToAppSetting(setting1) .Ctor<string>(param2).EqualToAppSetting(setting2) .Ctor<string>(param3).EqualToAppSetting(setting3); This
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
I'm using a class similar to this one http://forgottencoders.co.uk/showthread.php?tid=53 but the ini file I'm

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.