#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf-8
#写脚本的时候习惯把自己常用的模块都import进来了
import sys
import sre_compile
import re
import pdb
import os
import codecs
import time
import datetime
#注意:尽量使用C语言实现的那种,因为它速度更快,而且消耗的内存更少。
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
profile = r'E:\abc.xml'
buildxml = ET.parse(profile).getroot()
for child in buildxml.findall('timenode'):
if (child.text != ''):
print "timenode 节点存在"