<%@ LANGUAGE=JScript %> <% //. . . xmlDocument.validateOnParse = true; xmlDocument.loadXML(xmlStr); if (xmlDocument.parseError. errorCode != 0) { returnStr = "Parse Error: " + xmlDocument.parseError.reason + "<BR>" + "occurred at line: " + xmlDocument.parseError.line + "<BR>" + "-------------<BR>" + "source: " + xmlDocument.parseError.srcText; } else { // ... do whatever } Response.Write(returnStr); %>