Click to See Complete Forum and Search --> : VALIDATING and SAVING XML files


enigmaos
September 17th, 2001, 10:41 AM
Here's a piece of code written in VB for sending reponses, and I'm having a problem with VALIDATING and SAVING the incoming XML files.

For SAVING, I have tried xmldoc.Save("\\networkdrive\temp.xml") after the last line - result.Save(Response), and it didn't work.

For VALIDATION, I have tried the following after this line - xmlDoc.Load(Request), but it didn't work also.
xmlDoc.async = False
xmlDoc.validateOnParse = True

The following is the actual VB code in the ASP file.

<%@LANGUAGE=VBScript%>
<%
Dim xmlDoc
Dim result
Dim xNode
'
'
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
Set result = Server.CreateObject("Microsoft.XMLDOM")
'
xmlDoc.Load(Request)
Set xNode = xmlDoc.selectSingleNode("//datetimeStamp")
xNode.Text = CStr(Now)
'
Response.ContentType="text/xml"
result.LoadXML(xmlDoc.XML)
result.Save(Response)
%>

Does anybody know??

Thanks!!!


enigmaos@yahoo.com