|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Change Value of Existing Element<?xml version="1.0" encoding="utf-16"?> <Request> <Operations> <Command> <OpType>login</OpType> <Params> <UserName>leebo</UserName> <Password>leebo</Password> </Params> </Command> </Operations> </Request> I'm trying to find out how to change the value of an element, say <userName>john</UserName> I'm using an XmlDocument, but I've been searching MSDN and google groups for a couple of hours and I can't seem to find an answer. Must I create and use an XMLWriter to perform this one small function? Basically, I just need to change one element's value. Sorry for such as basic question. -- Warm Regards, Lee Hi,
Yes. You must read in the document and write it back with the changes. Ken ------------------ "Lee" <luv2program2***@yahoo.com> wrote in message I have an xml Structure:news:%23GW5GGffFHA.3936@TK2MSFTNGP10.phx.gbl... <?xml version="1.0" encoding="utf-16"?> <Request> <Operations> <Command> <OpType>login</OpType> <Params> <UserName>leebo</UserName> <Password>leebo</Password> </Params> </Command> </Operations> </Request> I'm trying to find out how to change the value of an element, say <userName>john</UserName> I'm using an XmlDocument, but I've been searching MSDN and google groups for a couple of hours and I can't seem to find an answer. Must I create and use an XMLWriter to perform this one small function? Basically, I just need to change one element's value. Sorry for such as basic question. -- Warm Regards, Lee Ken Tucker [MVP] enlightened me by writing:
> Hi, Thanks Ken. Can you provide a link to sample? I'd really appreciate> > Yes. You must read in the document and write it back > with the changes. > > Ken it. Thanks again, -- Warm Regards, Lee
System.Web.Mail.Smtp namespace
Intellisense question Need Help With Translation C#? to VB How to convert this code from C# to VB.NET? How To? import vb net forms ??? reference dependency warnings during build MessageBox coming up with blank message and blank buttons. how pass data between forms Case conversion "printf" style string method? |
|||||||||||||||||||||||