I am just starting XML coding to post data from 2 different application but ...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jp_lamy
Posted On:   Thursday, December 16, 2004 03:53 AM

I am having the following error message when processing the code underneath: "The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. XML document must have a top level element. Error processing resource 'http://thetestxml.com/lexml.asp'. " Could someone please help me to create that simple file and let me know how to proccess it in the second application ? <%@ Language=VBScript %> <% dim doc dim docElement dim root dim itemNode if Request.form("testfile") <> "" then ' Instantiate the XML processor set    More>>

I am having the following error message when processing the code underneath:
"The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. XML document must have a top level element. Error processing resource 'http://thetestxml.com/lexml.asp'. "

Could someone please help me to create that simple file and let me know how to proccess it in the second application ?


<%@ Language=VBScript %>

<%
dim doc
dim docElement
dim root
dim itemNode

if Request.form("testfile") <> "" then
' Instantiate the XML processor
set doc = Server.CreateObject("Microsoft.XMLDOM")
' The processor should validate the document
doc.ValidateOnParse = True
' Load the XML Document
doc.Load(Server.MapPath(Request.form("testfile")))
if (doc.readyState = 4 and doc.parseError.errorCode = 0) then
Response.Write ("Doc is good")
else
Response.Write ("Error : " & doc.parseError.reason)
end if
Response.Write("
" & " file: " & Request.form("testfile") & " has been validated XML

")
if Request.form("show") = "on" then
'dim objRootElement
'set objRootElement = doc.documentElement
'Response.Write(objRootElement.xml)
end if
end if

doc.async = false

Response.ContentType = "text/xml"

'doc.documentElement = root
set itemNode = doc.createElement("CPLW")

itemNode.appendChild(doc.createElement("USERID"))
itemNode.appendChild(doc.createElement("USERNAME"))
itemNode.childNodes(0).text = request.form("theUserid")
itemNode.childNodes(1).text = request.form("theUserName")

set doc = nothing
%>

   <<Less
About | Sitemap | Contact