#encoding= utf-8
import xml.etree.ElementTree as ET
try:
ET.parse("xml1.xml")
print u"ok"
except Exception,e:
print u"error"
print u"error:",e
python xml有效性判断
阅读 86
2023-03-05
#encoding= utf-8
import xml.etree.ElementTree as ET
try:
ET.parse("xml1.xml")
print u"ok"
except Exception,e:
print u"error"
print u"error:",e
相关推荐
精彩评论(0)