"CindyH" <> wrote in message
news:...
> Can you give me an example of how to use the .SetAttribute
> in my code?
>
>
Hows this :-
Imports System.Xml
....
Dim Doc As New XmlDocument
Dim dec As System.Xml.XmlDeclaration
dec = Doc.CreateXmlDeclaration("1.0", Nothing, Nothing)
dec.Encoding = "UTF-8"
Doc.AppendChild(dec)
Dim DocRoot As XmlElement = Doc.CreateElement("userlist")
Doc.AppendChild(DocRoot)
DocRoot.SetAttribute("ACTION", vAction)
DocRoot.SetAttribute("VENDORNAME", vVendorName)
Dim amouser As XmlElement = Doc.CreateElement("amouser")
DocRoot.AppendChild(amouser)
amouser .SetAttribute("AMOAID", vAMOAID)
amouser .SetAttribute("VENDORUSERNAME", vH2UserName)
amouser .SetAttribute("AMOATOKEN", vAMOAToken)
Dim xmlstring = Doc.OuterXml
--
Anthony Jones - MVP ASP/ASP.NET
|