-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.html
More file actions
114 lines (102 loc) · 3.81 KB
/
index.html
File metadata and controls
114 lines (102 loc) · 3.81 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<title>XML to JSON Converter</title>
</head>
<body>
<script type="text/x-handlebars" data-template-name="application">
<a href="https://github.com/dfsq/xml2json"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div class="container xml-container">
<ul class="nav nav-tabs">
<li>{{#linkTo xml.paste}}Input XML{{/linkTo}}</li>
<li>{{#linkTo about}}About{{/linkTo}}</li>
<li class="add-this pull-right">{{partial "addthis"}}</li>
</ul>
<div class="container">{{outlet}}</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="xml">
<div class="row">
<div class="span5">
<form {{action submit on="submit"}}>
<fieldset>
{{outlet}}
<div class="control-group">
<button type="submit" class="btn">Parse Source</button>
<button type="button" {{bindAttr class=":btn :btn-clear clearDisabled:disabled"}}>Clear</button>
</div>
</fieldset>
</form>
</div>
<div class="span7">
<legend>
Parse Result
<small>Hint: click the tag to select the JSON root.</small>
</legend>
<div class="parse-result">{{outlet rendered}}</div>
</div>
</div>
<div class="container">{{outlet json}}</div>
</script>
<script type="text/x-handlebars" data-template-name="xml/paste">
<legend>Input XML</legend>
{{#view App.XmlView}}
<textarea name="xml" class="field span5" placeholder="Paste raw XML data"><?xml version="1.0" ?>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<price>
<normal>44.95</normal>
<discount>40.95</discount>
</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications with XML.</description>
</book></textarea>
{{/view}}
</script>
<script type="text/x-handlebars" data-template-name="rendered">
<pre>{{{content}}}</pre>
</script>
<script type="text/x-handlebars" data-template-name="result">
<legend>Code</legend>
<pre>{{code}}</pre>
</script>
<script type="text/x-handlebars" data-template-name="json">
<legend>JSON<div class="pull-right">{{partial "jsonoptions"}}</div></legend>
<pre>{{json}}</pre>
</script>
<script type="text/x-handlebars" data-template-name="_jsonoptions">
<label class="checkbox inline">{{view Ember.Checkbox checkedBinding="attributes"}} Include Attributes</label>
<label class="checkbox inline">{{view Ember.Checkbox checkedBinding="inline"}} Inline String</label>
</script>
<script type="text/x-handlebars" data-template-name="about">
<p>This is a simple application aiming making XML to JSON conversion simple.</p>
<p>Powered by EmberJS.</p>
<p>2013 © Aliaksandr Astashenkau</p>
</script>
<script type="text/x-handlebars" data-template-name="_addthis">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<!-- AddThis Button END -->
</script>
<script src="js/lib/jquery-1.9.1.js"></script>
<script src="js/lib/handlebars-1.0.0-rc.3.js"></script>
<script src="js/lib/ember-1.0.0-rc.2.js"></script>
<script src="js/lib/xml2json.js"></script>
<script src="js/xmlparser.js"></script>
<script src="js/app.js"></script>
<!-- Addthis -->
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52b2166468accf19"></script>
</body>
</html>