ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/XmlTools2/documentation/jsxml-index.htm
Revision: 961
Committed: Sun Feb 16 18:11:09 2014 UTC (11 years, 7 months ago) by s10k
Content type: text/html
File size: 6516 byte(s)
Log Message:
XmlTools
Uploaded javascript documentation

File Contents

# Content
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <!-- saved from url=(0042)http://www.petetracey.com/jsxml/index.html -->
3 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4 <title>JSXML XML Tools</title>
5
6 <style>
7 BODY, TD { font-family: arial; font-size: 12px }
8 .navpane {
9 font-family: arial;
10 font-size: 14px;
11 border-right: #666666 2px solid;
12 padding-top: 5 px;
13 padding-right: 3 px;
14 padding-left: 5 px;
15 }
16 .contentspane {
17 font-family: arial;
18 font-size: 12px;
19 padding-top: 5 px;
20 padding-right: 3 px;
21 padding-left: 5 px;
22 }
23 .code {
24 background-color:#FFFFE8;
25 padding-left: 2px;
26 padding-top: 2px;
27 padding-bottom: 2px;
28 }
29 </style>
30
31 <meta name="Keywords" content="javascript, xml, jscript, script, xparse, msxml, parser, jsxml, extensible, rexml, iterator, peter, tracey, regular, expression, expressions, w3c">
32 <meta name="Description" content="JSXML is a library of XML tools written in JavaScript. It includes REXML, a regular expression-based XML that outperforms every existing JavaScript XML parser.">
33
34 <style type="text/css"></style></head>
35
36 <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
37 <!-- * header * -->
38 <table cellspacing="0" cellpadding="0" width="100%" height="100%"><tbody><tr><td valign="top" class="navpane">
39
40 <b>Home</b><br>
41 <a href="http://www.petetracey.com/jsxml/documentation.html">Documentation</a><br>
42 <a href="http://www.petetracey.com/jsxml/download.html">Download</a><br>
43 <br><br>
44 <a href="http://sourceforge.net/projects/jsxml/" target="_top"> <img src="./jsxml-index_files/sflogo.php" width="88" height="31" border="0" alt="SourceForge Logo"></a><br><br>
45 <br><br>
46 <a href="http://www.askuschat.com/service/chat/BJFB/client/client.php" target="askusBJFB" onclick="oWin=window.open(&quot;&quot;,&quot;askusBJFB&quot;,&quot;scrollbars=no,status=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,width=540,height=300&quot;);"><img src="./jsxml-index_files/launch.php" border="0" alt=""></a>
47 <br><br>
48 </td><td class="contentspane" valign="top">
49 <!-- * /header * -->
50
51
52 <form name="Form">
53 <span style="font-size: 14px; font-weight: 600;">JSXML XML Tools</span>
54 <br><br>
55 <span style="font-size: 12px; font-weight: 600;">
56 Version 1.3<br>
57 JavaScript XML Library, released under the LGPL license - created by <a href="http://www.levelthreesolutions.com/" target="_top">Level Three Solutions</a><br><br>
58 </span>
59 JSXML includes REXML, a high-performance parser that doesn't mind if you throw 2000 lines of (well-formed) XML at it, a builder with a unique API that invites the coding of GUIs (graphical user interfaces) around it, and an iterator that makes costly recursion unnecessary. It was released under the LGPL (it's free for private and commercial use, no strings attached) and has been downloaded over 300 times.
60 <br><br>
61 JSXML includes
62 <ul>
63 <li>REXML - a light-weight regular expression-based XML parser
64 <ul>
65 <li> Gives you programatic access to XML documents.
66 </li><li> Integrates with the JSXMLBuilder and JSXMLIterator
67 </li><li> The fastest JavaScript XML Parser available
68 </li></ul>
69 </li><li>REXML Lite - a stripped down version of REXML
70 <ul>
71 <li> Whitespace has been removed and internal variables renamed - file size is 1.9 KB!
72 </li><li> No support for text, cdata, and pi elements (however text is still accessible through the text property of an element).
73 </li><li> Text property of elements doesn't include text of that element's children
74 </li><li> Interchangable with REXML, as long as no unsupported functions are accessed
75 </li></ul>
76 </li><li>JSXMLBuilder - a flat interface to modify XML
77 <ul>
78 <li> JSXMLBuilder makes it easier to program GUIs that leverage the flexibility of XML<br>
79 To tree or not to tree?<br>
80 Most APIs for XML use a tree structure, which initially seems to be the right approach given that XML is itself tree-stuctured. However, anyone who has built a user interface which uses XML via MSXML or another tree-structured API knows as soon as there are several user actions that result in XML modifications, the code quickly become unmanageable. Therefore the JSXMLBuilder object takes the tree structure from REXML and makes it accessbile with a flat interface. The childElement and parentElement methods are still available, but there are many other ways to access and manipulate elements, making it very convenient to alter pieces of the XML directly from events in the GUI, without navigating through the API hunting for elements.
81 </li><li> Text is not stored as a child element, and there is no support for comment, cdata, and pi type elements. Text is accessed and writable through the text property of an element.
82 </li></ul>
83 </li><li>JSXMLIterator - a tool to iterate the tree structure of a REXML object without using recursion
84 </li></ul>
85
86 <br>
87 <br>
88 Because it is based on regular expressions and uses efficient JavaScript code, REXML is extremely fast. Take a look at these comparisons (click the image to enlarge):
89
90 <br><br>
91 <table>
92 <tbody><tr>
93 <td>
94 Figure 1:<br>
95 <a href="./jsxml-index_files/xmlparse.gif" target="_new"><img src="./jsxml-index_files/xmlparse.gif" border="1" width="550"></a>
96 </td>
97 <td valign="top">Notice that at one point REXML is <i>faster</i> than MSXML, which is compiled code and only works in recent versions of Internet Explorer (REXML is cross-browser compatible). Also, initializing MSXML for the first time costs you 200 MS on an everyday computer, which is not counted here but in cases of one-time use REXML is faster for anything less than 2000 lines!</td>
98 </tr>
99 </tbody></table>
100 <br><br>
101 Figure 2:<br>
102 <a href="./jsxml-index_files/xmlparse2.gif" target="_new"><img src="./jsxml-index_files/xmlparse2.gif" border="1" width="550"></a>
103
104 <br><br>
105 <b><a href="http://www.jeremie.com/Dev/XML/index.jer" target="_top">Xparse</a> (V .91)<br>
106 <a href="http://xmljs.sourceforge.net/" target="_top">XML For Script</a> (V .22)</b>
107 <br><br>
108 The <a href="http://www.petetracey.com/jsxml/test.html">test</a> area allows you to perform a live run of each of the parsers' main functions against any XML.
109 <br><br>
110 For comments, a list of issues, or to submit an new issue see: <a href="http://sourceforge.net/projects/jsxml/">http://sourceforge.net/projects/jsxml/</a><br>
111 <a href="http://sourceforge.net/projects/jsxml/" target="_top"> <img src="./jsxml-index_files/sflogo.php" width="88" height="31" border="0" alt="SourceForge Logo"></a><br><br>
112
113
114 <br>
115 <br>
116 </form></td></tr></tbody></table>
117
118
119 </body></html>