xml| Script
Hard to write a WAP file, but can not browse on the micro-equipment, hand and no professional validation editing tools, a good headache ~
Use the following script to simply use Microsoft.XMLDOM to validate your XML document!
<job id= "VALIDATEWML" >
<script language= "JScript" >
if (wscript.arguments.length==0) {
WScript.Echo ("Please drag to verify file to this script");
Wscript.Quit ();
}
var objargs = new Enumerator (wscript.arguments);
for (;! Objargs.atend (); Objargs.movenext ()) {
VALIDATEWML (Objargs.item ());
}
function validatewml (file) {
var xmldoc = new ActiveXObject ("Microsoft.XMLDOM");
Xmldoc.async= "false";
Xmldoc.load (file);
Xmldoc.loadxml (xmlstring);//To validate strings
if (xmldoc.parseerror.errorcode!=0)
{
txt= "Error code:" + XmlDoc.parseError.errorCode + "\ n";
txt=txt+ "Error Reason:" + XmlDoc.parseError.reason;
txt=txt+ "Error Line:" + xmlDoc.parseError.line;
WScript.Echo (TXT);
}
Else
{
WScript.Echo ("No Errors Found");
}
}
</script>
</job>