#NEWLINE# def load_fields( data ) : #NEWLINE# #INDENT# map_data = urlopen ( ( data . src + '/ows' ) , urlencode ( { #NEWLINE# #INDENT# 'service' : 'wfs' , #NEWLINE# 'version' : '1.1.0' , #NEWLINE# 'request' : 'DescribeFeatureType' , #NEWLINE# 'typename' : ( ( doc . prefix + ':' ) + data . filename ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# doc = BeautifulStoneSoup ( map_data . read ( ) ) #NEWLINE# elements = doc . find ( 'xsd:complextype' ) #NEWLINE# tags = elements . findAll ( 'xsd:element' ) #NEWLINE# names = [ ] #NEWLINE# for t in tags : #NEWLINE# #INDENT# if match ( '^gml:' , t [ 'type' ] ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# names . append ( str ( t [ 'name' ] ) ) #NEWLINE# #UNINDENT# return names