-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXSQLite.html
More file actions
73 lines (60 loc) · 2.07 KB
/
XSQLite.html
File metadata and controls
73 lines (60 loc) · 2.07 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
<!DOCTYPE html>
<html>
<head>
<title>XSQLite: Web Code Generator</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="keywords" content="sql, sqlite, xml">
<meta name="author" content="Willian Donadelli"/>
<meta name="description" content="XSQLite Object Web Code Generator. Enter the xml structure and get the SQLite structure."/>
<meta name="rating" content="general" />
<meta name="revisit-after" content="2 days" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link href="https://wdonadelli.github.io/wd/v2/wd.css" rel="stylesheet" />
<script src="https://wdonadelli.github.io/wd/v2/wd.js"></script>
<script src="XSQLite.js"></script>
<script>
function start() {
try {
var x = XSQLite(wd$("#xml").item(0).value);
wd$("#sqlite").item(0).textContent = x.toSQL();;
} catch(e) {
console.log(e);
wd$("#sqlite").item(0).textContent = e;
}
return;
};
function example() {
var xml = wd("example.xml");
xml.request(function(x) {
wd$("#xml").item(0).value = x.text;
}).get();
return;
}
</script>
</head>
<body class="wd-flyer">
<header class="wd-head wd-box-black">
<h3><a href="https://wdonadelli.github.io/XSQLite/" class="wd-text-white">XSQLite</a>: Web Code Generator</h3>
</header>
<nav class="wd-nav wd-buddy wd-box-opaque-out wd-box-white">
<a href="#" data-wd-action="tab{#tab_xml}" data-wd-click="">XML</a>
<a href="#" data-wd-action="tab{#tab_sql}" onclick="start();" >SQL</a>
</nav>
<div class="wd-content">
<div>
<div id="tab_xml">
<form class="wd-vform wd-margin">
<textarea id="xml" class="wd-box-green wd-input wd-radius" style="height: 400px" placeholder="XML content"></textarea>
<div class="wd-text-small wd-text-blue wd-input-help">Enter the XML code in the field above and click <q>SQL</q> to see the result.</div>
</form>
<footer class="wd-foot">
<a href="#" onclick="example();" >Load Example</a>
</fotter>
</div>
<div id="tab_sql" class="wd-text-smaller">
<pre id="sqlite" class="wd-code"></pre>
</div>
</div>
</body>
</html>