Mapping Element
The Mapping element is used in DOCICON.XML to map particular document types to their respective icons.
Syntax
<Mapping
Key = "Text"
Value = "Text">
</Mapping>
Attributes
Name | Description |
---|---|
Key | Required Text. Specifies either a ProgID or a file extension. |
Value | Required Text. Specifies the URL to the image. |
Related Elements
Parent Elements |
---|
ByExtension, ByProgID, Default |
Example
The code sample below does the following:
- For different values of the ProgID <META> tag, it maps ProgIDs to the icons representing the applications. For example, "Excel.Sheet" maps to ichtmxls.gif.
- It maps file extensions to appropriate icons. For example, "doc" maps to icdoc.gif.
- If neither of the above causes a match, it provides a default value, icgen.gif, for the mapping.
<DocIcons>
<ByProgID>
<Mapping Key="Excel.Sheet" Value="ichtmxls.gif"/>
<Mapping Key="PowerPoint.Slide" Value="ichtmppt.gif"/>
<Mapping Key="Word.Document" Value="ichtmdoc.gif"/>
</ByProgID>
<ByExtension>
<Mapping Key="doc" Value="icdoc.gif"/>
<Mapping Key="gif" Value="icgif.gif"/>
<Mapping Key="htm" Value="ichtm.gif"/>
<Mapping Key="html" Value="ichtm.gif"/>
<Mapping Key="ppt" Value="icppt.gif"/>
</ByExtension>
<Default>
<Mapping Value="icgen.gif"/>
</Default>
</DocIcons>