89 |
Information should only be retrieved with the respective |
Information should only be retrieved with the respective |
90 |
get*() methods. |
get*() methods. |
91 |
""" |
""" |
92 |
root = xml.dom.minidom.parseString(data).documentElement |
xml_dom = xml.dom.minidom.parseString(data) |
93 |
|
root = xml_dom.documentElement |
94 |
|
|
95 |
# Extract the title |
# Extract the title |
96 |
foo = getElementByName(getElementByName(root, 'Service'), 'Title') |
foo = getElementByName(getElementByName(root, 'Service'), 'Title') |
105 |
# Extract fees information |
# Extract fees information |
106 |
foo = getElementByName(getElementByName(root, 'Service'), 'Fees') |
foo = getElementByName(getElementByName(root, 'Service'), 'Fees') |
107 |
if foo and len(foo.childNodes[0].data) \ |
if foo and len(foo.childNodes[0].data) \ |
108 |
and lower(foo.childNodes[0].data) != 'none': |
and foo.childNodes[0].data.lower() != 'none': |
109 |
self.fees = foo.childNodes[0].data |
self.fees = foo.childNodes[0].data |
110 |
|
|
111 |
# Extract access information |
# Extract access information |
112 |
foo = getElementByName(getElementByName(root, 'Service'), |
foo = getElementByName(getElementByName(root, 'Service'), |
113 |
'AccessConstraints') |
'AccessConstraints') |
114 |
if foo and len(foo.childNodes[0].data) \ |
if foo and len(foo.childNodes[0].data) \ |
115 |
and lower(foo.childNodes[0].data) != 'none': |
and foo.childNodes[0].data.lower() != 'none': |
116 |
self.access = foo.childNodes[0].data |
self.access = foo.childNodes[0].data |
117 |
|
|
118 |
# Extract output format information |
# Extract output format information |
126 |
self.peekLayers(getElementByName(getElementByName( |
self.peekLayers(getElementByName(getElementByName( |
127 |
root, 'Capability'), 'Layer'), -1) |
root, 'Capability'), 'Layer'), -1) |
128 |
|
|
129 |
|
xml_dom.unlink() |
130 |
|
|
131 |
|
|
132 |
def peekLayers(self, top, parent): |
def peekLayers(self, top, parent): |
133 |
""" |
""" |