summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpyeletree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyeletree.py b/pyeletree.py
index 4b30159..0af240f 100755
--- a/pyeletree.py
+++ b/pyeletree.py
@@ -7,8 +7,8 @@ def process(f):
r = et.parse(f).getroot()
tg = r.findall("./front/article-meta/title-group")
at = tg[0].find("article-title")
- if at is not None and at.text is not None:
- print "article-title:", at.text.encode('utf-8')
+ if at is not None:
+ print "article-title:", "".join(at.itertext()).encode('utf-8')
for xmlf in sys.argv[1:]:
f = open(xmlf, "rb")