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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:10:19+00:00 2026-05-23T14:10:19+00:00

Firstly, I am new to XML and C# . I need some pointers with

  • 0

Firstly, I am new to XML and C#. I need some pointers with finding and replacing an xml node value.

I have an XML file which has a set of input parameters. I need to find a specific input parameter (<parameter id="PRP_AsOfDate">) in the file and then update an associated value (<UCDateEndGetString>27/06/2011</UCDateEndGetString>).

This will need to done daily so I need to replace the <UCDateEndGetString> with a tag and replace that.

I have tried the following code but get an illegal character error.

Can anyone help please?

public string TestRequestDef()
    {
        string reqtype = "Position";
        GetRequestDef getxml = new GetRequestDef();
        string xmlcall = getxml.GetXMLRequest(reqtype);

        XmlDocument doc = new XmlDocument();
        doc.Load(xmlcall);

        string newValue = "XXXX";
        XmlNode paraNode = doc.SelectSingleNode("parameters/parameter/UCValue/UCPitDateGetString");
        paraNode.Attributes[0].Value = newValue;
        doc.Save(xmlcall);

        return xmlcall;

I am using .Net 4.0 and C#.

Here is some of my xml file:

<parameters>
        <parameter id="PRP_AsOfDate">
            <deoId/>
            <groupBy>false</groupBy>
            <dateControlVisible>true</dateControlVisible>
            <pitControlVisible>true</pitControlVisible>
            <excludeFromOutput>false</excludeFromOutput>
            <multiCurrencyRequired>false</multiCurrencyRequired>
            <label>As Of Date</label>
            <style type="Date">
                <maxSelect>0</maxSelect>
                <minSelect>0</minSelect>
                <level/>
                <content/>
                <fieldTypes/>
                <dataObjectType>Date</dataObjectType>
                <filter/>
                <value/>
                <formatString/>
            </style>
            <formatString/>
            <validations/>
            <UCValue>
                <UCComposites/>
                <UCIdGetString/>
                <UCNameGetString/>
                <UCDateDays>0</UCDateDays>
                    <UCDateStartGetString>01/01/1900</UCDateStartGetString>
                <UCDateEndGetString>27/06/2011</UCDateEndGetString>
                <UCPitDateGetString>26/06/2011 00:00:00</UCPitDateGetString>
                <UCPitDatePreviousGetString>26/06/2011 00:00:00</UCPitDatePreviousGetString>
                <UCPitChecked>True</UCPitChecked>
                <UCDateOptionGetString>SPECIFIC</UCDateOptionGetString>
                <UCDefaultValueGetString>True|SPECIFIC|27/06/2011|</UCDefaultValueGetString>
                <UCValueGetString>True|SPECIFIC|27/06/2011|</UCValueGetString>
            </UCValue>
        </parameter>
  • 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-23T14:10:20+00:00Added an answer on May 23, 2026 at 2:10 pm

    I would give this article a quick read. Its very easy to follow and I believe it covers exactly what you are trying to accomplish.

    http://www.codeproject.com/KB/cpp/myXPath.aspx

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

Sidebar

Related Questions

Firstly, I am very new to function pointers and their horrible syntax so play
Firstly, let me set out what I'd like to do. Assume I have three
I have a form/calculator, which posts to itself some data, this data is then
Since I am new to iOS development I have a few Questions. Firstly I
I've created a simple xml file here: http://roberthan.host56.com/productsNew.xml which is quite simple, the root
Firstly, I am new to both android and Java. I have two classes, my
Firstly, Im new to android but have years of various other programming experience on
Firstly, I'm some what new to C++/CLI . After doing some research I've found
Firstly I am new to android and Java so this is a beginners question.
Firstly, Real World Haskell , which I am reading, says to never use foldl

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.