XML with VB.NET

lgdt

New member
Joined
Jun 27, 2005
Messages
2
Programming Experience
10+
I have the following code (written in classic ASP with VB) which I need to convert to VB.NET. Basically I need to replace tags in an XML file writing it back.

I am absoultely flummoxed as to how to do it. Any suggestions would be gratefully received.

Thanks in advance.

Set rootNode = Server.CreateObject("AspXml.AspXml")
rootNode.LoadXmlFile Server.MapPath("../_templates/" & strtmpFilename)
Set Contentnode = Server.CreateObject("AspXml.AspXml")
set TmpNode = rootNode.getroot
if Not (tmpNode is Nothing) then


tmpNode.RemoveAllAttributes
tmpnode.tag = "div"
if strmode="edit" then
tmpnode.addattribute "id","thisis" & strmode & "mode"

else
tmpnode.addattribute "id",strmode

end if

else
Response.Write ("ERROR : NO Maslow Template tag found [TAG <rb:tmp>]")
end if
 
Back
Top