0
点赞
收藏
分享

微信扫一扫

python xml有效性判断

独西楼Q 2023-03-05 阅读 86

#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 条评论