vbs changes < to &lt; and my > to &gt; when importing file contents

Ziya

New Member
I have absolutly no idea when it comes to VB-script so I was quite happy when i frankenstiend two simple code snipets found online to insert the entire contents of a text file into a xml document.all works well except my \[code\]<\[/code\] have changed to \[code\]<\[/code\] and my \[code\]<\[/code\] has changed to \[code\]>\[/code\]how can I overcome thisMy frankencode:\[code\] Const ForReading = 1Set objFSO = CreateObject("Scripting.FileSystemObject")Set objTextFile = objFSO.OpenTextFile _ ("c:\test.txt", ForReading)strText = objTextFile.ReadAllobjTextFile.CloseSet xmlDoc = _ CreateObject("Microsoft.XMLDOM")xmlDoc.Async = "False"xmlDoc.Load("C:\Audits.xml")Set colNodes=xmlDoc.selectNodes _ ("/TOOLS")For Each objNode in colNodes objNode.text= (strText)NextxmlDoc.Save "C:\Audits.xml" \[/code\]
 
Back
Top