Windows2003-3790/tools/postbuildscripts/checkxml.js

31 lines
653 B
JavaScript
Raw Normal View History

2001-01-01 00:00:00 +01:00
xmlDoc = new ActiveXObject( "Msxml2.DOMDocument" );
try
{
res = xmlDoc.load( WScript.Arguments(0) );
}
catch(e)
{
res = false;
}
if(res != true)
{
WScript.Echo( "Bad xml "+
WScript.Arguments(0)+
"!!\n");
err = xmlDoc.parseError;
WScript.Echo( "reason : " + err.reason );
WScript.Echo( "line : " + err.line );
WScript.Echo( "linepos: " + err.linepos );
WScript.Echo( "filepos: " + err.filepos + "\n" );
WScript.Echo( err.srcText.substr( err.linepos - 10, 60 ) );
WScript.Echo( "---------^" );
}