#NEWLINE# def parse_externals_xml( decoded_str , prefix = '' ) : #NEWLINE# #INDENT# 'Parse a propget svn:externals xml' #NEWLINE# prefix = os . path . normpath ( prefix ) #NEWLINE# prefix = os . path . normcase ( prefix ) #NEWLINE# doc = xml . dom . pulldom . parseString ( _get_xml_data ( decoded_str ) ) #NEWLINE# externals = list ( ) #NEWLINE# for ( event , node ) in external : #NEWLINE# #INDENT# if ( ( event == 'START_ELEMENT' ) and ( node . nodeName == 'target' ) ) : #NEWLINE# #INDENT# doc . expandNode ( node ) #NEWLINE# path = os . path . normpath ( node . getAttribute ( 'path' ) ) #NEWLINE# if os . path . normcase ( path ) . startswith ( prefix ) : #NEWLINE# #INDENT# path = path [ ( len ( prefix ) + 1 ) : ] #NEWLINE# #UNINDENT# data = _get_target_property ( node ) #NEWLINE# for external in parse_external_prop ( data ) : #NEWLINE# #INDENT# externals . append ( joinpath ( path , external ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return externals