HI team,
I want to write a shell script to check weather a xml is in well from or not ? but i didn't get any infromation regarding this. i got some python script however its not working well in unix server. it would be grateful to me if yoiu people can help me to sort out this ...
############################################
i try with this python script while importing the header it got stuck up...
#!/usr/bin/env python
from xml.parsers.xmlproc import xmlval
import sys
def parseFile(file):
parser=xmlval.XMLValidator()
parser.parse_resource(file)
if len(sys.argv) != 2:
print '''Usage:
python %s filename
''' % sys.argv[0]
sys.exit(0)
file=sys.argv[1]
#f=open(file)
try:
parseFile(file)
print "%s is well-formed and valid" % file
except Exception,e:
print "%s is not well-formed or not valid %s!" % (file, e)
######################################
Error is :
#!/usr/bin/env python
module load python/core/2.5
+ module load python/core/2.5
from xml.parsers.xmlproc import xmlval
+ from xml.parsers.xmlproc import xmlval
Can't open /var/mail/xml.parsers.xmlproc
import sys
+ import sys