Menu

#6 Set namespace before output

1.0
open
nobody
None
2014-11-13
2014-11-13
Ken
No
--- tcx_vpower.py.orig  2014-11-12 20:53:53.000000000 -0500
+++ tcx_vpower.py 2014-11-12 20:54:42.000000000 -0500
@@ -280,6 +280,9 @@
     """
     Process one TCX file. Write new TCX file (with vpower_ prepended to TCX file name).
     """

+    ET.register_namespace('',
+            'http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2')
+
     tree = ET.parse(tcxfile)
     root = tree.getroot()

Discussion


Log in to post a comment.

Auth0 Logo