Click here to Skip to main content
15,921,643 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Insert node between particular node Pin
ksanju100025-May-05 0:29
ksanju100025-May-05 0:29 
GeneralCopy/Clone XML node Pin
jeffb_22-May-05 7:35
jeffb_22-May-05 7:35 
GeneralRe: Copy/Clone XML node Pin
DavidNohejl22-May-05 11:50
DavidNohejl22-May-05 11:50 
Generalwant to generate Schema using WriteXmlSchema() Pin
favor0320-May-05 19:59
favor0320-May-05 19:59 
GeneralRe: want to generate Schema using WriteXmlSchema() Pin
DavidNohejl22-May-05 11:33
DavidNohejl22-May-05 11:33 
Generalmsxmlcpp library Pin
ikasovitch19-May-05 6:46
ikasovitch19-May-05 6:46 
GeneralRe: msxmlcpp library Pin
DavidNohejl22-May-05 11:51
DavidNohejl22-May-05 11:51 
Generalupdate particular attribute's value from xml file Pin
ksanju100018-May-05 4:24
ksanju100018-May-05 4:24 
Hi
my program updates only farm name I want to search through loop farm name and it should
update address,
user and password from the existing file name

XmlDocument xmldoc = new XmlDocument();
xmldoc.Load("c:/farm-config.xml");
XmlNode farm=xmldoc.SelectSingleNode("/root/farm-config/farm/@name");
MessageBox.Show(farm.InnerText);
farm.InnerText="devxcv1";
MessageBox.Show(farm.InnerXml);
xmldoc.Save("c:/farm-config.xml");

My XMl strucutrue is as given below
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm name="sanjay">
<connection address="127.0.0.1" user="dog" password="cat">
<lastjob>Copy-All</lastjob>
<lastconnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
<farm name="ram">
<connection address="localhost" user="root" selectedConnection="1" password="daask">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>

</farm>
</farm-config>
</root>

--- supoose i want to find thr loop ram and i want o change address,user and password attribues value thr loop
if i change it changes the upper ones farm name=sanjay 's address,user and password

regards
sanjeev
GeneralRe: update particular attribute's value from xml file Pin
DavidNohejl22-May-05 11:22
DavidNohejl22-May-05 11:22 
GeneralRe: update particular attribute's value from xml file Pin
ksanju100022-May-05 18:30
ksanju100022-May-05 18:30 
GeneralXML &amp; ASP.NET - automate daily updates Pin
shahar rr r17-May-05 0:50
shahar rr r17-May-05 0:50 
GeneralRe: XML &amp; ASP.NET - automate daily updates Pin
Anonymous17-May-05 1:36
Anonymous17-May-05 1:36 
GeneralRe: XML &amp; ASP.NET - automate daily updates Pin
shahar rr r18-May-05 4:59
shahar rr r18-May-05 4:59 
Generalcreate xsd scheme Pin
Anonymous16-May-05 22:40
Anonymous16-May-05 22:40 
GeneralRe: create xsd scheme Pin
niansah17-May-05 2:11
niansah17-May-05 2:11 
GeneralRe: create xsd scheme Pin
Brian Van Beek23-May-05 8:57
Brian Van Beek23-May-05 8:57 
GeneralRe: create xsd scheme Pin
eggie524-May-05 18:00
eggie524-May-05 18:00 
GeneralInserting node element between nodes Pin
ksanju100016-May-05 21:39
ksanju100016-May-05 21:39 
GeneralRe: Inserting node element between nodes Pin
DavidNohejl17-May-05 8:32
DavidNohejl17-May-05 8:32 
Generalcomplex XML Serialization Pin
jhsun414-May-05 8:42
jhsun414-May-05 8:42 
GeneralRe: complex XML Serialization Pin
DavidNohejl14-May-05 9:06
DavidNohejl14-May-05 9:06 
GeneralRe: complex XML Serialization Pin
jhsun414-May-05 9:23
jhsun414-May-05 9:23 
GeneralRe: complex XML Serialization Pin
jhsun414-May-05 9:28
jhsun414-May-05 9:28 
GeneralRe: complex XML Serialization Pin
DavidNohejl14-May-05 9:31
DavidNohejl14-May-05 9:31 
GeneralRe: complex XML Serialization Pin
jhsun414-May-05 9:32
jhsun414-May-05 9:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.