Parses the xsi:schemaLocation attribute on `node`.

    Returns:
        A list of (ns, schemaLocation) tuples for the node.

    Raises:
        KeyError: If `node` does not have an xsi:schemaLocation attribute.
320797
def get_schemaloc_pairs(node):
    
    schemalocs = node.attrib[TAG_SCHEMALOCATION]
    l = schemalocs.split()
    return zip(l[::2], l[1::2])
11810
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'styleId'
          @id = value.value.to_s
        when 'styleName'
          @name = value.value.to_s
        when 'val'
          @value = value.value.to_s
        end
      end

      node.xpath('*').each do |style_node_child|
        case style_node_child.name
        when 'wholeTbl'
          @whole_table = TableElement.new(parent: self).parse(style_node_child)
        when 'band1H'
          @banding_1_horizontal = TableElement.new(parent: self).parse(style_node_child)
        when 'band2H', 'band2Horz'
          @banding_2_horizontal = TableElement.new(parent: self).parse(style_node_child)
        when 'band1V'
          @banding_1_vertical = TableElement.new(parent: self).parse(style_node_child)
        when 'band2V'
          @banding_2_vertical = TableElement.new(parent: self).parse(style_node_child)
        when 'lastCol'
          @last_column = TableElement.new(parent: self).parse(style_node_child)
        when 'firstCol'
          @first_column = TableElement.new(parent: self).parse(style_node_child)
        when 'lastRow'
          @last_row = TableElement.new(parent: self).parse(style_node_child)
        when 'firstRow'
          @first_row = TableElement.new(parent: self).parse(style_node_child)
        when 'seCell'
          @southeast_cell = TableElement.new(parent: self).parse(style_node_child)
        when 'swCell'
          @southwest_cell = TableElement.new(parent: self).parse(style_node_child)
        when 'neCell'
          @northeast_cell = TableElement.new(parent: self).parse(style_node_child)
        when 'nwCell'
          @northwest_cell = TableElement.new(parent: self).parse(style_node_child)
        end
      end
      self
    end
427740
def parse_xml_node(self, node):
        '''

        '''
        self.group_id = node.getAttributeNS(RTS_NS, 'groupId')
        self._members = []
        for c in node.getElementsByTagNameNS(RTS_NS, 'Members'):
            self._members.append(TargetComponent().parse_xml_node(c))
        return self
1188231
def getXMLNS(self, prefix=None):
        
        if prefix == XMLSchemaComponent.xml:
            return XMLNS.XML
        parent = self
        ns = self.attributes[XMLSchemaComponent.xmlns].get(prefix or\
                XMLSchemaComponent.xmlns_key)
        while not ns:
            parent = parent._parent()
            ns = parent.attributes[XMLSchemaComponent.xmlns].get(prefix or\
                    XMLSchemaComponent.xmlns_key)
            if not ns and isinstance(parent, WSDLToolsAdapter):
                if prefix is None:
                    return ''
                raise SchemaError, 'unknown prefix %s' %prefix
        return ns
673752
def parse(node)
      @type = node.name.to_sym
      case node.name
      when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
      when 'cut', 'fade'
        @through_black = option_enabled?(node, 'thruBlk')
      when 'split'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
        @orientation = node.attribute('orient').value.to_sym if node.attribute('orient')
      when 'wheel', 'wheelReverse'
        @spokes = option_enabled?(node, 'spokes')
      end
      self
    end
1329580
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'applyFont'
          @apply_font = attribute_enabled?(value)
        when 'applyBorder'
          @apply_border = attribute_enabled?(value)
        when 'applyFill'
          @apply_fill = attribute_enabled?(value)
        when 'applyNumberFormat'
          @apply_number_format = attribute_enabled?(value)
        when 'applyAlignment'
          @apply_alignment = attribute_enabled?(value)
        when 'fontId'
          @font_id = value.value.to_i
        when 'borderId'
          @border_id = value.value.to_i
        when 'fillId'
          @fill_id = value.value.to_i
        when 'numFmtId'
          @number_format_id = value.value.to_i
        when 'quotePrefix'
          @quote_prefix = attribute_enabled?(value)
        end
      end
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'alignment'
          @alignment.parse(node_child) if @apply_alignment
        end
      end
      self
    end
522460
def node_location(config_node):
    
    if isinstance(config_node, ConfigNode):
        return _NodeLocation(config_node._line, config_node._column)
    if isinstance(config_node, ValueNotFoundNode):
        raise JSONConfigValueNotFoundError(config_node)
    raise TypeError('Expected a config node but received a %s instance.' %
                    type(config_node).__name__)
285171
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'type'
          @unit = value.value.to_sym
        when 'w', 'val'
          @value = value.value.to_f
        end
      end
      self
    end
600846
def parse(node)
      @id = node.attribute('id').value
      @type = node.attribute('type').value
      node.xpath('*').each do |text_field_node_child|
        case text_field_node_child.name
        when 't'
          @text = text_field_node_child.text
        end
      end
      self
    end
137041
def parse_osm_nodes_paths(osm_data):
    

    nodes = {}
    paths = {}
    for element in osm_data['elements']:
        if element['type'] == 'node':
            key = element['id']
            nodes[key] = get_node(element)
        elif element['type'] == 'way': #osm calls network paths 'ways'
            key = element['id']
            paths[key] = get_path(element)

    return nodes, paths
110566
def find_node(self, attribute):
        

        for model in GraphModel._GraphModel__models_instances.itervalues():
            for node in foundations.walkers.nodes_walker(model.root_node):
                if attribute in node.get_attributes():
                    return node
437550
def _load_schema(self, location, xml=None):
        
        cachedir = self._cachedir
        # wsdl2py: deal with XML Schema
        if not os.path.isdir(cachedir): os.mkdir(cachedir)
    
        file = os.path.join(cachedir, '.cache')
        section = 'TYPES'
        cp = ConfigParser()
        try:
            cp.readfp(open(file, 'r'))
        except IOError:
            del cp;  cp = None
            
        option = location.replace(':', '-') # colons seem to screw up option
        if (cp is not None and cp.has_section(section) and 
            cp.has_option(section, option)):
            types = cp.get(section, option)
        else:
            # dont do anything to anames
            if not self._pyclass:
                containers.ContainerBase.func_aname = lambda instnc,n: str(n)
                
            from pyremotevbox.ZSI.wstools import XMLSchema
            reader = XMLSchema.SchemaReader(base_url=location)
            if xml is not None and isinstance(xml, basestring):
                schema = reader.loadFromString(xml)
            elif xml is not None:
                raise RuntimeError, 'Unsupported: XML must be string'
            elif not os.path.isfile(location):
                schema = reader.loadFromURL(location)
            else:
                schema = reader.reader.loadFromFile(location)
                
            # TODO: change this to keyword list
            class options:
                output_dir = cachedir
                schema = True
                simple_naming = False
                address = False
                lazy = self._lazy
                complexType = self._pyclass

            schema.location = location
            files = commands._wsdl2py(options, schema)
            if cp is None: cp = ConfigParser()
            if not cp.has_section(section): cp.add_section(section)
            types = filter(lambda f: f.endswith('_types.py'), files)[0]
            cp.set(section, option, types)
            cp.write(open(file, 'w'))
            
        if os.path.abspath(cachedir) not in sys.path:
            sys.path.append(os.path.abspath(cachedir))
            
        mod = os.path.split(types)[-1].rstrip('.py')
        return __import__(mod)
1309922
def parse_xml_node(self, node):
        '''

        '''
        self.connector_id = node.getAttributeNS(RTS_NS, 'connectorId')
        self.name = node.getAttributeNS(RTS_NS, 'name')
        if node.hasAttributeNS(RTS_NS, 'transMethod'):
            self.trans_method = node.getAttributeNS(RTS_NS,
                                                         'transMethod')
        else:
            self.trans_method = ''
        self.comment = node.getAttributeNS(RTS_EXT_NS, 'comment')
        if node.hasAttributeNS(RTS_EXT_NS, 'visible'):
            visible = node.getAttributeNS(RTS_EXT_NS, 'visible')
            if visible == 'true' or visible == '1':
                self.visible = True
            else:
                self.visible = False

        if node.getElementsByTagNameNS(RTS_NS, 'sourceServicePort').length != 1:
            raise InvalidServicePortConnectorNodeError
        self.source_service_port = TargetPort().parse_xml_node(\
                node.getElementsByTagNameNS(RTS_NS, 'sourceServicePort')[0])
        if node.getElementsByTagNameNS(RTS_NS, 'targetServicePort').length != 1:
            raise InvalidServicePortConnectorNodeError
        self.target_service_port = TargetPort().parse_xml_node(\
                node.getElementsByTagNameNS(RTS_NS, 'targetServicePort')[0])
        for c in get_direct_child_elements_xml(node, prefix=RTS_EXT_NS,
                                               local_name='Properties'):
            name, value = parse_properties_xml(c)
            self._properties[name] = value
        return self
111891
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'blip'
          @file_reference = FileReference.new(parent: self).parse(node_child)
        when 'tile'
          @tile = Tile.new(OOXMLCoordinates.parse(node_child, x_attr: 'tx', y_attr: 'ty'),
                           OOXMLCoordinates.parse(node_child, x_attr: 'sx', y_attr: 'sy'),
                           parent: self).parse(node_child)
        end
      end
      self
    end
206219
def GetSubNodeByLocation(self, location):
    
    for sub_node in self.sub_nodes:
      sub_node_location = getattr(sub_node.path_spec, 'location', None)
      if location == sub_node_location:
        return sub_node

    return None
918846
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'blipFill'
          @path_to_image = DocxBlip.new(parent: self).parse(node_child)
        when 'spPr'
          @properties = DocxShapeProperties.new(parent: self).parse(node_child)
        when 'nvPicPr'
          @non_visual_properties = NonVisualShapeProperties.new(parent: self).parse(node_child)
        end
      end
      self
    end
930295
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'count'
          @count = value.value.to_i
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'xf'
          @xf_array << Xf.new(parent: self).parse(node_child)
        end
      end
      self
    end