changeset 9:4c6e15514a6d

Parse Name and Organization in a Acknowledgment as multiple elements
author Benoît Allard <benoit.allard@greenbone.net>
date Wed, 08 Oct 2014 12:44:20 +0200
parents cb8b2a196f0b
children 7998a57c9b48
files farolluz/parsers/cvrf.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/farolluz/parsers/cvrf.py	Wed Oct 08 12:43:34 2014 +0200
+++ b/farolluz/parsers/cvrf.py	Wed Oct 08 12:44:20 2014 +0200
@@ -94,9 +94,14 @@
 
 
 def parseAcknowledgment(elem, ns='cvrf'):
+    names = []
+    for cvrfname in elem.findall(UN(ns, 'Name')):
+        names.append(cvrfname.text.strip())
+    orgs = []
+    for cvrforg in elem.findall(UN(ns, 'Organization')):
+        orgs.append(cvrforg.text.strip())
     return CVRFAcknowledgment(
-        elem.findtext(UN(ns, 'Name')),
-        elem.findtext(UN(ns, 'Organization')),
+        names, orgs,
         elem.findtext(UN(ns, 'Description')),
         elem.findtext(UN(ns, 'URL')),
     )
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)