'Converts an xml fragment into a dictionary. The parent xml element
contains a list of xml elements where each element has a child element for
the key, and another for the value.
Example:
xmldoc=
<ExtendedProperties>
<ExtendedProperty>
<Name>Ext1</Name>
<Value>Val1</Value>
</ExtendedProperty>
<ExtendedProperty>
<Name>Ext2</Name>
<Value>Val2</Value>
</ExtendedProperty>
</ExtendedProperties>
element_type=str
parent_xml_element_name=\'ExtendedProperties\'
pair_xml_element_name=\'ExtendedProperty\'
key_xml_element_name=\'Name\'
value_xml_element_name=\'Value\''

@staticmethod
def _fill_dict_of(xmldoc, parent_xml_element_name, pair_xml_element_name, key_xml_element_name, value_xml_element_name):

    return_obj = {}
    xmlelements = _MinidomXmlToObject.get_child_nodes(xmldoc, parent_xml_element_name)
    if xmlelements:
        xmlelements = _MinidomXmlToObject.get_child_nodes(xmlelements[0], pair_xml_element_name)
        for pair in xmlelements:
            keys = _MinidomXmlToObject.get_child_nodes(pair, key_xml_element_name)
            values = _MinidomXmlToObject.get_child_nodes(pair, value_xml_element_name)
            if (keys and values):
                key = keys[0].firstChild.nodeValue
                valueContentNode = values[0].firstChild
                value = (valueContentNode.nodeValue if valueContentNode else None)
                return_obj[key] = value
    return return_obj
