The ClientMap.xml file defines how to map user-agent strings to client (device) types. This is done by mapping portions of the string sent in the user-agent header to specific device names, then defining the format the device expects to receive. ClientMap.xml uses the following DTD: <?xml version="1.0" encoding="UTF-8"?> <!ELEMENT clients (device)+> <!ELEMENT device EMPTY> <!ATTLIST device name CDATA #REQUIRED> <!ATTLIST device key CDATA #REQUIRED> <!ATTLIST device format CDATA #REQUIRED> device elementAttributes:
The order of placement is important as the first key match will be returned. If no match is found the device is named "unknown" and set to accept "text" format data. Example: <clients> <device name="explorer" key="MSIE" format="xhtml"/> <device name="pocketexplorer" key="MSPIE" format="wap"/> <device name="handweb" key="HandHTTP" format="xhtml"/> <device name="avantgo" key="AvantGo" format="xhtml"/> <device name="imode" key="DoCoMo" format="imode"/> <device name="opera" key="Opera" format="xhtml"/> <device name="lynx" key="Lynx" format="xhtml"/> <device name="java" key="Java" format="xhtml"/> <device name="wap" key="Nokia" format="wap"/> <device name="wap" key="UP" format="wap"/> <device name="wap" key="Wapalizer" format="wap"/> <device name="mozilla5" key="Mozilla/5" format="html"/> <device name="mozilla5" key="Netscape6" format="html"/> <device name="netscape" key="Mozilla" format="html"/> </clients> All trademarks and copyrights are the property of their respective owners.
Copyright © 2002-2004 by Xenei.com, All Rights Reserved
|