?? bixstypeconverter.html
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--
Generated using api.website.xsl version 2003-07-17
-->
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BiXsTypeConverter</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript">
function showDerivedClasses() {
var ul = document.getElementById("api-derived-classes");
var lis = ul.childNodes;
var l = lis.length;
for (var i = 1; i < l; i++)
lis[i].style.display = "";
lis[0].style.display = "none";
}
</script></head>
<body>
<h1 id="BiXsTypeConverter">BiXsTypeConverter</h1>
<p>
This class contains static methods that converts XML Schema types to Javascript
types as well as converting strings formatted according to the XML Schema
to Javascript values.<br>
<br>
The following type relations are used<br>
XS type name - JS type name - JS class<br>
"negativeInteger" - "number" - Number<br>
"unsignedShort" - "number" - Number<br>
"unsignedByte" - "number" - Number<br>
"unsignedLong" - "number" - Number<br>
"unsignedInt" - "number" - Number<br>
"decimal" - "number" - Number<br>
"boolean" - "number" - Number<br>
"integer" - "number" - Number<br>
"double" - "number" - Number<br>
"float" - "number" - Number<br>
"short" - "number" - Number<br>
"byte" - "number" - Number<br>
"long" - "number" - Number<br>
"int" - "number" - Number<br>
"QName" - "string" - String<br>
"string" - "string" - String<br>
"normalizedString" - "string" - String<br>
"dateTime" - "date" - Date<br>
"date" - "date" - Date<br>
"time" - "date" - Date
</p>
<p>This class extends
<code><a href="BiObject.html">BiObject</a></code>
and therefore all methods and fields available for
<code><a href="BiObject.html">BiObject</a></code>
are also available for <code>BiXsTypeConverter</code>.</p>
<ul class="partial-class-tree">
<li><code><a href="BiObject.html">BiObject</a></code><ul>
<li><code>BiXsTypeConverter</code><ul id="api-derived-classes"></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiXsTypeConverter()</code></p>
<h3>Parameters</h3>
<p>No parameters.</p>
<h2>Properties</h2>
<p>None.</p>
<h2>Methods</h2>
<p>None.</p>
<h2>Events</h2>
<p>None.</p>
<h2>Static Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#decodeIsoDate">decodeIsoDate</a></code></td>
<td>
Takes a string formatted according to the XML Schema data
type (this is the ISO standard format).
</td>
</tr>
<tr>
<td><code><a href="#decodeIsoDateTime">decodeIsoDateTime</a></code></td>
<td>
Takes a string formatted according to the XML Schema datatime
type (this is the ISO standard format).
</td>
</tr>
<tr>
<td><code><a href="#decodeIsoTime">decodeIsoTime</a></code></td>
<td>
Takes a string formatted according to the XML Schema time
type (this is the ISO standard format).
</td>
</tr>
<tr>
<td><code><a href="#getJsType">getJsType</a></code></td>
<td>
Takes the XML Schema type name and returns the Javacsript type
(class, constructor). For example if you pass <code>"time"</code>
you will get <code>Date</code> as the result.
</td>
</tr>
<tr>
<td><code><a href="#getJsTypeName">getJsTypeName</a></code></td>
<td>
Takes the XML Schema type name and returns the Javacsript type
name. For example if you pass <code>"time"</code>
you will get <code>"date"</code> as the result.
</td>
</tr>
<tr>
<td><code><a href="#getJsValueType">getJsValueType</a></code></td>
<td>
Takes a string formated according to the XML Schema type name and
returns the Javacsript value for that string.
</td>
</tr>
</tbody>
</table>
<h2>Static Fields</h2>
<p>None.</p>
<h2>Remarks</h2>
<p>None.</p>
<h2>Static Method Details</h2>
<h3><a name="decodeIsoDate"></a>decodeIsoDate</h3>
<p>
Takes a string formatted according to the XML Schema data
type (this is the ISO standard format).
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiXsTypeConverter.decodeIsoDate(<span class="methodArgument">s</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>s</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The string representing the ISO date.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Date</code></p>
<h3><a name="decodeIsoDateTime"></a>decodeIsoDateTime</h3>
<p>
Takes a string formatted according to the XML Schema datatime
type (this is the ISO standard format).
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiXsTypeConverter.decodeIsoDateTime(<span class="methodArgument">s</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>s</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The string representing the ISO date time.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Date</code></p>
<h3><a name="decodeIsoTime"></a>decodeIsoTime</h3>
<p>
Takes a string formatted according to the XML Schema time
type (this is the ISO standard format).
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiXsTypeConverter.decodeIsoTime(<span class="methodArgument">s</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>s</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The string representing the ISO date time.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Date</code></p>
<h3><a name="getJsType"></a>getJsType</h3>
<p>
Takes the XML Schema type name and returns the Javacsript type
(class, constructor). For example if you pass <code>"time"</code>
you will get <code>Date</code> as the result.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiXsTypeConverter.getJsType(<span class="methodArgument">sXsType</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>sXsType</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The XML Schema type name
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Function</code></p>
<h3><a name="getJsTypeName"></a>getJsTypeName</h3>
<p>
Takes the XML Schema type name and returns the Javacsript type
name. For example if you pass <code>"time"</code>
you will get <code>"date"</code> as the result.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiXsTypeConverter.getJsTypeName(<span class="methodArgument">sXsType</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>sXsType</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The XML Schema type name
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getJsValueType"></a>getJsValueType</h3>
<p>
Takes a string formated according to the XML Schema type name and
returns the Javacsript value for that string.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiXsTypeConverter.getJsValueType(<span class="methodArgument">sValue</span>, <span class="methodArgument">sXsType</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>sValue</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
A string containing the value formatted according to the
XML Schema type.
</td>
</tr>
<tr>
<td><code>sXsType</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The XML Schema type name
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Object</code></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -