source: DPPP/kml/csml2kml/python/csml2kml/csml2kml/configuration.py @ 3298

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/DPPP/kml/csml2kml/python/csml2kml/csml2kml/configuration.py@3298
Revision 3298, 555 bytes checked in by mkochan, 13 years ago (diff)

Created a convertor module PointSeriesConvertor?.py.

Line 
1from cElementTree import ElementTree, Element, SubElement
2
3class Configuration:
4
5    # Load / parse in the config file
6    def __init__(self, configFilename):
7        self.tree = ElementTree()
8        self.root = self.tree.parse(configFilename)
9
10    # Get the text value/content for a setting at some xPath. xPath cannot contain
11    # XML attribute specifiers due to older version of cElementTree package.
12    def get(self, xPath):
13        str = self.root.findtext(xPath)
14        return str
15
16    # Get root
17    def getRoot(self):
18        return self.root
Note: See TracBrowser for help on using the repository browser.