# encoding:utf-8
import os
import stat
import xml.etree.ElementTree as ET
f=open('picture.txt','a')
nowDir = os.getcwd() # 得到进程当前工作目录
fileList = os.listdir(nowDir) # 得到进程当前工作目录中的所有文件名称列表
for fileName in fileList: # 获取文件列表中的文件
if fileName.endswith("pictuer.xml"): # 只看xml文件
print (fileName)
tree = ET.parse(fileName)
root = tree.getroot()
# 第一层解析
#print ("root-tag:", root.tag, ',root-attrib:', root.attrib, ',root-text:', root.text)
# 第二层解析
for child in root:
#print ('child-tag:', child.tag, ',child.attrib:', child.attrib, ',child.text:', child.text)
# 第三层解析
for sub in child:
if sub.text.endswith((&#