how to change a value or in some node elements

hello guys

i have a problems with xmls

how to set or change values from xml node elements from an existent xml file 
using C#
from this xml file
<xml version="1.0"> 
 <students>
     <student-name>jean</student-name>
  </students>

to this 

<xml version="1.0"> 
 <students>
     <student-name>jacob philiphe</student-name>
  </students> 

only i change one value to the student-name and yet!!!!!

how to make

Thanks
0
Jacob (28)
10/9/2007 6:09:00 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
718 Views

Similar Articles

[PageSpeed] 29

jacob wrote:

> how to set or change values from xml node elements from an existent xml file 
> using C#
> from this xml file
> <xml version="1.0"> 
>  <students>
>      <student-name>jean</student-name>
>   </students>
> 
> to this 
> 
> <xml version="1.0"> 
>  <students>
>      <student-name>jacob philiphe</student-name>
>   </students> 
> 
> only i change one value to the student-name and yet!!!!!

With .NET you can use System.Xml.XmlDocument e.g.
   XmlDocument xmlDoc = new XmlDocument();
   xmlDoc.Load("file.xml");
   XmlNode name = xmlDoc.SelectSingleNode(
"students/student-name[. = 'jean']");
   if (name != null) {
     name.InnerText = "jacob philiphe";
     xmlDoc.Save("file.xml");
   }

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
10/10/2007 12:40:00 PM
Reply:

Similar Artilces:

Public folders changes problem
Hi On Exchange 2007 I created public folder named "IT" and inside a calendar called "IT calnedar" that is used for all events in our IT department. It's strange when our secretary adds events into this calendar and mark them with different colors (categories) these changes (the right color for each event) are only shown in Outlook 2003 or OWA, but in Outlook 2007 all colors are mixed up. We all have Outlook 2007 in IT department, so we all see wrong colors, but when I try to log-on through OWA or with a test machine that has Outlook 2003 installed everything is O...

Changing programmatically the color of a row
Like subject, is possible to change the color of an entiere row (o multiple cells) with a condition? Thanks -- masterx8 ----------------------------------------------------------------------- masterx81's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1525 View this thread: http://www.excelforum.com/showthread.php?threadid=26878 Hi rows(1).interior.colorindex=9 "masterx81" wrote: > > Like subject, is possible to change the color of an entiere row (or > multiple cells) with a condition? > Thanks! > > > -- > masterx81 > -...

Price List change the price element alone (CRM 4.0 Spanish)
When I add a product to the price list, I specified the price of it. Then I click under the SAVE option, and it change alone from 100.00 € to 1.000.000.00€. I am not using Discount Lists, and The Unit measurement is 1 quantity. We are working with Euro divisa. I upgraded from CRM 3 to 4 using the spanish version. Any idea about why it is failing? Check your number format in "Workspace" check the "Format-Tab" there the numberformat might be wrong (dots and commas) so it is for german (germany) not for german (austria). so wie fond another language which wasn't test...

can I put total value from subtotal into next column
Hi as above. i want the total be put into next column, is this possible? thanks Leung Not by using anything built into excel. Leung wrote: > > Hi > as above. > > i want the total be put into next column, is this possible? > > thanks > > Leung -- Dave Peterson ...

save changes
How can I get excel to stop asking me to save changes when i didn't make any changes? ver 2003 thanks If the workbook you opened was created in an earlier version of Excel you will get the "save changes" message. Save as 2003 version. You will also get the message if you have used any volatile function(s) in your workbook. Could be a NOW() or TODAY() List of volatile functions........ AREAS() OFFSET() CELL() INDIRECT() NOW() TODAY() RAND() Any one or more of these would cause the workbook changes. Gord Dibben MS Excel MVP On Wed, 24 Jan 2007 14:41:54 -0...

change email address of contact in distribution group
Does Outlook2007 change the email address of member in a group if I have changed email address of individual's profile. When I hit UPDATE when I am in a group listing, joeblow@cox.net does not change to joeblow@cox.com even tho I have changed his email address in his individual listing. Must I update each group joeblow is in manually? Thanks for help Clicking "Update Now" will update any changed addresses of people in your Contacts list. -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.htm &quo...

Pull down menues with automatic values
Well this is my first time here and the first time i have known abou the forum. Im not into Excel as a use on a daily base scenario, but i have got t use it a lot in my University course from now on. Ive been asked to produce a spreadsheet which will allow a user t create their own computer. The user HAS to select certain component like motherboard, hard drive, processor etc. Beside each component there should be a drop down list to give the use a wide choice of products relating to the component, then when the select what they want, the price of that component should show u beside the com...

Users unable to change password
We are running Exchange 2000 on a Windows 2000 server. Users are not members of the domain and never have been. They have previously been able to log into Outlook with their username and password, and change their password from the login box or using the "options" menu within Outlook. After a recent reboot, they are no longer able to change their own passwords. They get an error message about not having the required permissions to perform the request. As far as I am aware, nothing changed on the server before the reboot. I have already checked and the "Everyone" group alr...

how to change the pivot chart automaticaly as values in the worksheet change
Hi, I would like to know how I can make the pivot chart change automaticaly as I change the values in the work sheet? I also would like to know how can i merge file from such pivot chart/s? Jeevan ...

Need to Change Case from Mixed to Caps
Please help! I have a number of imported worksheets with some fields formatted in mixed case and some in UPPER case. I want all data to look consistent. Is there a way that I can quickly turn all of the mixed case to upper case? Word has a button to do this but I don't see one in Excel. Thanks in advance. Hi, have a look at the UPPER function in XLHelp -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Kathy" wrote: > Please ...

OWA and Must Change Password
We are running Windows 2003 SP1 and Exchange 2003 SP1. I have setup the Change Password feature of OWA (KB297121), and have the hotfix (included in SP1) 833734. Changing passwords via the 'Change Password' button within OWA works fine. My problem is that when the 'User Must Change Password at Next Login' is checked, the OWA login does not work. It insists the user must enter the correct user and password. The IISadmpwd change password utility works fine - even when the 'User Must change Password' box is checked. How do I get this functionality to work with O...

How to change currency
Hi Everyone, Can anyone help me out in solving the issue I would like to change the functional currency of a company, how do i do it Note: I have entered the transaction earlier with different currency GP 9.0 Thanks Asnsar Functional Currency is the first step in setting up system and it is linked to many tables. So, If you've done any transactions it is difficult to change the functional currency though you clear all data and transaction history and so on. The best way is to create a new company instead. Thanks ...

Help--Cell value automatically divided by 10
In XL2000, any numerical value entered into any cell is divided by 1 before being displayed--there are no formulas in cell. If a formula i written using that cell value (the real value), the correct number i used in the calculation (but not displayed correctly). XL is als SLOW--glacially slow as a matter of fact. If I save an XL file on this machine to a floppy and run it on anothe machine, it runs as expected--ie numbers are displayed as entered (onc corrected to the real number), and the program runs at normal speed. Any suggestions as to how to fix this install (and what happened in th f...

Standard Cost Roll up (using Standard Cost Changes)
Hi all, We are finding that when we change a component on a sub-assembly, the resulting roll-up is affecting other sub-assemblies that share the same parents but not the changed component. For example: We changed the cost a component item for sub-assembly 25-0051 and roll up the sub-assembly. This sub-assembly reports to our top level 30-0100 and 30-0101. The roll-up then went and changed ALL related assemblies that share the top level 30-0100 and 30-0101. These assemblies DO NOT share the changed component but do have other proposed changes since last roll/revalue. These proposed...

change worksheet data without changing chart
I am attempting to create a scatter plot chart in Excel that will not get modified each time I sort my Excel worksheet. Does anybody know how to "lock" the chart or export it so that it is no longer linked to the worksheet? Thanks!!! Here's how to unlink a chart from its data: http://peltiertech.com/Excel/ChartsHowTo/DelinkChartData.html - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ shelly wrote: > I am attempting to create a scatter plot chart in Excel > that will not ge...

Worksheet Change Event
I'm looking for an easy way to track changes in a large spreadsheet Could someone help me with code to add a date into column P if any changes are made in the row. The range that this needs to apply to are is A2:N5000 I know this is a worksheet change event but don't understand the mechanics of writing the code to do what I want Hi Karen Try the below which makes use of Worksheet Change and Selection events to track real changes made to the worksheet. Select the sheet tab which you want to work with. Right click the sheet tab and click on 'View Code'. This will...

changing details for a contact-person that another user created
Hi All, we have several departments using the CRM, and people would like to have the possibility for changing the details in a contact person that was created by another user. Normally a chief would make a contact and add it in CRM, and then the stuff takes over, and maintains those contact - but they don't have the right to edit those contact... How do I solve this? Thanx in advance, Regards, Zoran I assume you have one Business Unit. If you look at security role , there are options "Write " "Append" "AppendTo" under the tab"Core Records"...

Default Account keeps changing
I am running SBS 2003 and I have 2 Vista Laptops running Office 2007. When I set an smtp account as the default account in Outlook, after I reboot, my default email account gets changed back the Exchange Account, which I don't want. This happens with 2 different laptops belonging to 2 different users. Is there a setting in SBS that overrides this each time the laptops log onto the domain? I've gone through it and I can't find anything. You can't have both POP and Exchange in the same profile. You need to set up separate profiles. "rcolburn3@verizon.net" wrote: &g...

How do I change the color scheme of a pre-existing border in Publ.
I am using a border from those available within Publisher, and I would like to change the color scheme when I print it. What is the best way to do that? >-----Original Message----- >I am using a border from those available within Publisher, and I would like >to change the color scheme when I print it. What is the best way to do that? >. > You didn't say what version of Publisher that you are using. You didn't say what you are placing the border around. So I'm going to spend my time telling you how to put a border around a text box in Publisher 2003. Right clic...

Is it possible to change User-Agent for Outlook 2010?
Can this header be set or disabled programmatically or through registry? It is set to custom string even for traffic inside add-in's web browser control. "DamianD" <DamianD@discussions.microsoft.com> wrote in message news:2A514043-18A9-42A5-828F-0283A1897FB3@microsoft.com... > Can this header be set or disabled programmatically or through registry? It > is set to custom string even for traffic inside add-in's web browser > control. I don't know of any way to alter that value. -- Brian Tillman [MVP-Outlook] Damien Did you read the a...

Finding Duplicate Values
I need to find duplicate values within the same column. I see how to remove duplicates, but that is not what I need to do. I want to find the duplicates so that I can have those duplicate records corrected. Found one solution myself: Conditional Formating. I'm still interested in different solutions if there are any. Thanks "Spencer" <res19twi@verizon.net> wrote in message news:Wc91i.445$w51.78@trndny09... >I need to find duplicate values within the same column. I see how to >remove duplicates, but that is not what I need to do. I want to find the >...

Changing the calendar master template
I am trying to create a calendar for my office & I have a question about using the calendar template. We have several offices and various people are in different places at different times of the week. I would like to have a list within each day of the calendar that could be changed. For example: Smith: location A, Jones: location B, Jackson: location C. I would like to have "smith:, Jones:, Jackson:" be in each box, and then on a weekly, monthly basis, their exact location can be entered in on the calendar and then printed up and distriubuted. I know this may have been...

changing the default recipient policy
I'm using Exch2k Server and need to change our email naming convention. currently the email addresses are auto-generated using the first four letters of the first name and the first four letters of the last name i.e. Robert Smith would be robesmit@domain.com This appears in the Recipient Policy as: %4g%4s@domain.com Could someone please point me in the right direction on how to change the default Recpient Policy so that the email addresses will be generated like so: Robert Smith = robert.smith@domain.com I'm not sure about the syntax of this and how it should appear in the Recepi...

problem in changing changing color
Dear all I have office 2003 and I have a problem in outlook 2003 which is I can't change the color of the font when composing new message but changing color works in other programs except outlook plz can anyone help me in this as soon as possible Not in Plain Text Format. Try Tools\Options\Compose\Mail- Font Settings for HTML Peter "ms" <ms@alexfiber.com> wrote in message news:eNzl9%23vBFHA.612@TK2MSFTNGP09.phx.gbl... > Dear all > I have office 2003 and I have a problem in outlook 2003 which is I can't > change the color of the font when composing ...

Test cells for values if date matches
I have the following formula: =IF($AT$122:$BX$122=K$4,(IF(OR($AT$147:$BX$166="R"),"R",IF(OR($AT$147:$BX$166="Y"),"Y","G"))),"G") AT122:BX122 - Contains a work of date. K4 - Contains the date to be reported on. AT147:BX166 - Contains a status for a processing site ("R", "Y", or "G") I am trying to get the reporting cell to display an "R" if any of the cells in the column that has the date that matches K4 has an "R" in it. If there are no "R"s in that column, the...