This repository has been archived by the owner on Nov 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·69 lines (69 loc) · 2.98 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Convert xml config 3 > 4</title>
<script type="text/javascript">
var config=[
{ replace: 'fmc:LocationFinder', by: 'cmc:LocationFInder'},
{replace: 'fmc:Authentication', by: 'cmc:Authentication'},
{replace: 'fmc:BitmapClone', by: 'cmc:BitmapClone'},
{replace: 'fmc:ComponentVisibleButton', by: 'cmc:ComponentVisibleButton'},
{replace: "fmc:Debugger", by: "cmc:Debugger"},
{replace: "fmc:DownloadSelector", by: "cmc:DownloadSelector"},
{replace: "fmc:DownloadSelectorButton", by: "cmc:DownloadSelectorButton"},
{replace: "fmc:EditProperties", by: "cmc:EditProperties"},
{replace: "fmc:Extent", by: "cmc:Extent"},
{replace: "fmc:ExtentSelector", by: "cmc:ExtentSelector"},
{replace: "fmc:HotlinkResults", by: "cmc:HotlinkResults"},
{replace: "fmc:HotlinkResults", by: "cmc:HotlinkResults"},
{replace: "fmc:HotlinkResults2", by: "cmc:HotlinkResults2"},
{replace: "fmc:IdentifyResults", by: "cmc:IdentifyResults"},
{replace: "fmc:IdentifyResultsHTML", by: "cmc:IdentifyResultsHTML"},
{replace: "fmc:Image", by: "cmc:Image"},
{replace: "fmc:LanguagePicker", by: "cmc:LanguagePicker"},
{replace: "fmc:LayerProxy", by: "cmc:LayerProxy"},
{replace: "fmc:Legend", by: "cmc:Legend"},
{replace: "fmc:LocationFinder", by: "cmc:LocationFinder"},
{replace: "fmc:LocationPin", by: "cmc:LocationPin"},
{replace: "fmc:LocationResultViewer", by: "cmc:LocationResultViewer"},
{replace: "fmc:Logo", by: "cmc:Logo"},
{replace: "fmc:MapProxy", by: "cmc:MapProxy"},
{replace: "fmc:NamedExtentViewer", by: "cmc:NamedExtentViewer"},
{replace: "fmc:Print", by: "cmc:Print"},
{replace: "fmc:PrintLabel", by: "cmc:PrintLabel"},
{replace: "fmc:PrintTemplate", by: "cmc:PrintTemplate"},
{replace: "fmc:QueryComponent", by: "cmc:QueryComponent"},
{replace: "fmc:RemoteEventDispatcher", by: "cmc:RemoteEventDispatcher"},
{replace: "fmc:Tab", by: "cmc:Tab"},
{replace: "fmc:TabControl", by: "cmc:TabControl"},
{replace: "fmc:TextArea", by: "cmc:TextArea"},
{replace: "fmc:Theme", by: "cmc:Theme"},
{replace: "fmc:ThemeSelector", by: "cmc:ThemeSelector"},
{replace: "fmc:ToolBuffer", by: "cmc:ToolBuffer"},
{replace: "fmc:ToolDataFilter", by: "cmc:ToolDataFilter"},
{replace: "fmc:URL", by: "cmc:URL"},
{replace: "fmc:URLButton", by: "cmc:URLButton"},
{replace: "fmc:URLSelector", by: "cmc:URLSelector"},
{replace: "fmc:Window", by: "cmc:Window"}
]
function convertXML(xml){
xml=xml.replace("xmlns:fmc=",'xmlns:cmc=\"cmc\" xmlns:fmc=');
for (var i=0; i < config.length; i++){
//xml = xml.replace(/config[i]/g):
xml = xml.replace(new RegExp(config[i].replace, 'g'), config[i].by);
}
return xml;
}
function convertConfig(){
var el = document.getElementById("textarea");
el.value = convertXML(el.value);
}
</script>
</head>
<body>
<h2>Insert configuration XML and hit the link</h2>
<textarea id="textarea" rows="50" cols="150">
</textarea> <br>
<a href="javascript: void(0)" onclick="convertConfig()">Convert config</a>
</body>
</html>