node doctype preventing me to read data

G

Girish

I have this XML FILE where I am reading data from and it has this node
doctype "< ! D O C T Y P E a d f S Y S T E M " h t t p : / / w h o s c
a l l i n g . c o m / d t d / a d f d t d . d t d " > "

ONLY When I remove this line I could display the data onto the browser, any
ideas WHY? if not I am using following code to remove the above line, it
doesn't work

Dim FindWhat, ReplaceWith

'dim MyString
'MyString= "Hello" & chr(34) & "World" & chr(34) & "World"

FindWhat = "< ! D O C T Y P E &nbsp;&nbsp;a d f &nbsp; S Y S T E M &nbsp;
" & chr(34) & " h t t p : / / w h o s c a l l i n g . c o m / d t d / a d f
d t d . d t d " & chr(34) & "&nbsp;>"
'FindWhat = FindWhat & " h t t p : / / w h o s c a l l i n g . c o m / d t
d / a d f d t d . d t d "
'FindWhat = FindWhat & ">"

response.write "FindWhat :" & FindWhat & "<br>"

ReplaceWith = ""

Dim fso, sText, fs, DestinationFile, writingFile, sPath
set fso = createobject("scripting.filesystemobject")
sPath = "D:\inetpub\PennyFlyer\carmartnew\business_ivr.xml"

if fso.FileExists(sPath) then

Set fs = fso_OpenTextFile(sPath)
sText = fs.ReadAll()

'response.write "sText" & sText

sText = Replace(sText, FindWhat, ReplaceWith)

DestinationFile = "D:\inetpub\PennyFlyer\carmartnew\newbusiness_ivr.xml"

Set writingFile = fso.CreateTextFile(DestinationFile,true,false)

WritingFile.Write(sText)

WritingFile.Close
end if

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top