Index: /XmlTools2/documentation/jsxml-documentation.htm
===================================================================
--- /XmlTools2/documentation/jsxml-documentation.htm	(revision 961)
+++ /XmlTools2/documentation/jsxml-documentation.htm	(revision 961)
@@ -0,0 +1,287 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!-- saved from url=(0050)http://www.petetracey.com/jsxml/documentation.html -->
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>JSXML XML Tools</title>
+
+<style>
+BODY, TD { font-family: arial; font-size: 12px }
+.navpane { 
+	font-family: arial; 
+	font-size: 14px;
+	border-right: #666666 2px solid;
+	padding-top: 5 px;
+	padding-right: 3 px;
+	padding-left: 5 px;
+}
+.contentspane { 
+	font-family: arial; 
+	font-size: 12px;
+	padding-top: 5 px;
+	padding-right: 3 px;
+	padding-left: 5 px;
+}
+.code {
+	background-color:#FFFFE8;
+	padding-left: 2px;
+	padding-top: 2px;
+	padding-bottom: 2px;
+}
+</style>
+
+<meta name="Keywords" content="javascript, xml, jscript, script, xparse, msxml, parser, jsxml, extensible, rexml, iterator, peter, tracey, regular, expression, expressions, w3c">
+<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.">
+
+<style type="text/css"></style></head>
+
+<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
+<!-- * header * -->
+<table cellspacing="0" cellpadding="0" width="100%" height="100%"><tbody><tr><td valign="top" class="navpane">
+
+<a href="http://www.petetracey.com/jsxml/index.html">Home</a><br>
+<b>Documentation</b><br>
+<a href="http://www.petetracey.com/jsxml/download.html">Download</a><br>
+<br><br>
+<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-documentation_files/launch.php" border="0" alt=""></a>
+<br><br>
+</td><td class="contentspane" valign="top">
+<!-- * /header * -->
+
+
+<form name="Form">
+<span style="font-size: 14px; font-weight: 600;">JSXML XML Tools</span>
+<br><br>
+<span style="font-size: 12px; font-weight: 600;">
+Version 1.2 Documentation<br><br>
+</span>
+<ul>
+	<li> <b><a href="http://www.petetracey.com/jsxml/documentation.html#REXML">REXML</a> </b>
+		<ul>
+			<li> Objects </li>
+			<li> Methods </li>
+			<li> Properties </li>
+		</ul>
+	</li>
+	<li> <b><a href="http://www.petetracey.com/jsxml/documentation.html#JSXMLBuilder">JSXMLBuilder</a> </b>
+		<ul>
+			<li> Objects </li>
+			<li> Methods </li>
+			<li> Properties </li>
+		</ul>
+	</li>
+	<li> <b><a href="http://www.petetracey.com/jsxml/documentation.html#JSXMLIterator">JSXMLIterator</a> </b>
+		<ul>
+			<li> Methods </li>
+			<li> Properties </li>
+		</ul>
+	</li>
+</ul>
+<br>
+<br>
+<a name="REXML">
+<b>REXML</b><br><br>
+The first step to accessing an XML document through the REXML parser is creating the object, passing it the XML document.
+<div class="Code">
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;var xmlDoc = new REXML(strXML);<br>
+<br>
+</div>
+<br>
+Alternatively, the parser object can be created, the <b>XML</b> property set, and the <b>parse</b> method called.
+<div class="Code">
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;var xmlDoc = new REXML();<br>
+&nbsp;&nbsp;&nbsp;&nbsp;...<br>
+&nbsp;&nbsp;&nbsp;&nbsp;xmlDoc.XML = strXML;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;xmlDoc.parse();<br>
+<br>
+</div>
+<br>
+Once the object is created and XML parsed, the following objects, methods, and properties are used to access the XML.
+<br>
+<br>
+<b>Objects</b>
+<br>
+<ul>
+<b>XMLElement</b>
+<br>
+<br>
+Each node in the XML document is exposed by an XMLElement object.
+<br>
+<br>
+<b>XMLElement Properties</b>
+<ul>
+	<li>type The type of the element can be:</li>
+		<ul>
+			<li>element</li>
+			<li>text</li>
+			<li>comment</li>
+			<li>pi</li>
+			<li>cdata</li>
+		</ul>
+	<li>name If the type is "element," the tag name</li>
+	<li>childElements[] An array of <b>XMLElement</b>s</li>
+	<li>parentElement The XML Element's parent XML Element</li>
+	<li>text The concatenated value of all text and cdata elements for the element</li>
+</ul>
+<b>XMLElement Methods</b>
+<ul>
+	<li>getText() Returns all text and cdata of all child elements</li>
+	<li>childElement(strElementName) Takes the elements tag name and returns the <b>XMLElement</b> if it's found in the element's children</li>
+	<li>attribute(strAttributeName) Takes the attribute name and returns the value, if found. Returns an empty string if the attribute isn't found.</li>
+</ul>
+</ul>
+<b>Methods</b>
+<ul>
+<b>parse()</b>
+<br>
+<br>
+The <b>parse</b> method is called for you if you pass the REXML object a string of XML. Otherwise you must call the parse method before you begin working with the XML.
+</ul>
+<b>Properties</b>
+<ul>
+<b>rootElement</b>
+<br>
+<br>
+The <b>rootElement</b> property is the entry point, returning the XMLElement for the first node of the document. To work with an XML document the next thing to do after creating the object is to access the rootElement property and use its properties and methods to navigate through the XML.
+<br>
+<br>
+</ul>
+<div class="Code">
+function ShowXML(strXML) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;var xmlDoc = new REXML(strXML);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;alert("The root element " + xmlDoc.rootElement.name + " has " xmlDoc.rootElement.childElements.length + " child elements.");<br>
+&nbsp;&nbsp;&nbsp;&nbsp;for (var i=0; i&lt;xmlDoc.rootElement.childElements.length; i++) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert("Child element of type " + xmlDoc.rootElement.childElements[i].type);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;}<br>
+}<br>
+</div>
+<br>
+<br>
+</a><a name="JSXMLBuilder">
+<b>JSXMLBuilder</b><br><br>
+To manipulate the XML you use the JSXMLBuilder object. Rather than using the structure of the API to give the elements position in the document, the position is given as a vertical and horizontal index (think rows and columns). This makes coding GUIs that manipulate XML a simpler matter, it's the reason there is a separation between the parser that reads and the builder that builds. The specialized roles make REXML a great JavaScript parser, and JSXMLBuilder a great way to manipulate XML through a user interface.
+<br>
+<br>
+<b>Objects</b>
+<br>
+<ul>
+<b>XMLElement</b>
+<br>
+<br>
+Each node in the XML document is exposed by an XMLElement object.
+<br>
+<br>
+<b>XMLElement Properties</b>
+<ul>
+	<li>type The type is always "element," JSXMLBuilder only supports normal ("tag") elements since support for CDATA, comment, etc would add to code size without any benefit.</li>
+	<li>name The element name</li>
+	<li>text The text of the element</li>
+	<li>index The vertical index of the element in the document</li>
+	<li>level The horizontal index of the element in the document</li>
+	<li>xmlBuilder A reference back to the xmlBuilder object</li>
+</ul>
+<b>XMLElement Methods</b>
+<ul>
+	<li>attribute(sAttributeName) Returns attribute value by name</li>
+	<li>setAttribute(sAttributeName, sValue) edits or adds an attribute</li>
+	<li>removeAttribute(sAttributeName) Removes an attribute</li>
+	<li>parentElement() Returns the elements parent element</li>
+	<li>childElement(Child) Returns a child element by name or number (0 is the first child element, 1 is the second, etc)</li>
+</ul>
+</ul>
+<b>Methods</b>
+<ul>
+	<b>addElementAt(strElement,Attributes,strText,iElemIndex,iElemLevel)</b><br><br>
+	Inserts the element at the specified level and index, after elements at the same level<br><br>
+	<b>insertElementAt(strElement,Attributes,strText,iElemIndex,iElemLevel)</b><br><br>
+	Inserts the element at the specified level and index<br><br>
+	<b>removeElement(iElemIndex)</b><br><br>
+	removes the element at the specified index<br><br>
+	<b>moveElement(iElem1Index,iElem2Index)</b><br><br>
+	moves the element and child elements at index 1 to index 2.<br><br>
+	<b>generateXML()</b><br><br>
+	returns an updated string of XML.<br><br>
+</ul>
+<b>Properties</b>
+<br>
+<ul>
+	<b>XML</b><br><br>
+	The string of XML. This is not updated when a change is made, <b>generateXML</b> must be called to get the new XML.<br><br>
+	<b>elements</b><br><br>
+	an array of JSXMLBuilder <b>XMLElements</b>. This is the entry point into the XML document, navigating through this array and associating indexes of nodes to pieces of the user interface looks something like this:<br><br>
+</ul>
+<div class="Code">
+&nbsp;&nbsp;xmlForm = new JSXMLBuilder();<br>
+&nbsp;&nbsp;xmlForm.load(document.Form.FormXML.value,xmlpForm.rootElement);<br><br>
+&nbsp;&nbsp;// draws interface for adding, deleting, and resizing columns (column slider)<br>
+&nbsp;&nbsp;function DrawTabs() { <br>
+&nbsp;&nbsp;&nbsp;&nbsp;var L = "";<br>
+&nbsp;&nbsp;&nbsp;&nbsp;var iIndex = LayoutRowSelector.Key;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;var iTab = 0;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;for (var i=iIndex+1; i&lt;xmlForm.elements.length &amp;&amp; xmlForm.element(i).level &gt; xmlForm.element(iIndex).level; i++) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmleElem = xmlForm.element(i);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (xmleElem.name == "CELL") {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;L += '&lt;td style="width:' + xmleElem.attribute("WIDTH") + '"'<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ' index=' + i<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ' tab=' + iTab<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ' onmousedown="StartDrag(this);" class="HashTD"'<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ' onclick=AddTab() style="font-size:12px"&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ '&lt;img scr="../images/spacer.gif" width=4 height=10 style="cursor:move" class="DragSpacerGif"&gt;&lt;/td&gt;';<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iTab++;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>
+&nbsp;&nbsp;&nbsp;&nbsp;}<br>
+&nbsp;&nbsp;&nbsp;&nbsp;L = '&lt;table id=TabSettings border=1 bordercolor="#0033ff" bgcolor="#ffffff" cellspacing=0 cellpadding=0 '<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ 'style="TABLE-LAYOUT:fixed; overflow: hidden;'<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ ' border: 1px thin; border-left: #0033ff 1px solid; border-right: #0033ff 1px solid" class="TabTable"&gt;'<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ '&lt;tr tabcount=' + iTab + '&gt;'<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ L<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ '&lt;/tr&gt;&lt;/table&gt;';<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;document.all["TabsHTML"].innerHTML = L;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;document.all["TabSettingPane"].style.display = 'inline';<br>
+&nbsp;&nbsp;}<br>
+</div>
+
+<ul>
+	<b>load</b><br><br>
+	 Takes either a REXML XML Element or a string of XML, if a string of XML is passed it will still need REXML to load the XML.<br><br>
+</ul>
+
+
+<br>
+<br>
+</a><a name="JSXMLIterator">
+<b>JSXMLIterator</b><br><br>
+JSXMLIterator iterates through the tree structure of a REXML XMLElement object without using recursion. It's easy to iterate tree structures with recursion, but costly. Avoiding recursion saves valuable time. 
+<br>
+<br>
+This example is the same as above but instead of only revealing the child elements of the root element it shows all the elements in the document.
+<div class="Code">
+function ShowXML(strXML) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;var xmlDoc = new REXML(strXML);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;for (var xmlIterator=new JSXMLIterator(xmlDoc.rootElement); xmlIterator.getNextNode();) {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert("Child element of type " + xmlIterator.xmleElem.type);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;}<br>
+}<br>
+</div>
+<br>
+<br>
+<b>Methods</b>
+<ul>
+	<b>getNextNode()</b><br><br>
+	Moves to the next element and sets xmleElem<br>
+	Returns true if there is a next element, false if the end of the document has been reached.
+</ul>
+<b>Properties</b>
+<br>
+<ul>
+	<b>xmleElem</b><br><br>The current XML Element
+</ul>
+
+
+</a></form></td></tr></tbody></table>
+
+
+</body></html>
Index: /XmlTools2/documentation/jsxml-index.htm
===================================================================
--- /XmlTools2/documentation/jsxml-index.htm	(revision 961)
+++ /XmlTools2/documentation/jsxml-index.htm	(revision 961)
@@ -0,0 +1,119 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!-- saved from url=(0042)http://www.petetracey.com/jsxml/index.html -->
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>JSXML XML Tools</title>
+
+<style>
+BODY, TD { font-family: arial; font-size: 12px }
+.navpane { 
+	font-family: arial; 
+	font-size: 14px;
+	border-right: #666666 2px solid;
+	padding-top: 5 px;
+	padding-right: 3 px;
+	padding-left: 5 px;
+}
+.contentspane { 
+	font-family: arial; 
+	font-size: 12px;
+	padding-top: 5 px;
+	padding-right: 3 px;
+	padding-left: 5 px;
+}
+.code {
+	background-color:#FFFFE8;
+	padding-left: 2px;
+	padding-top: 2px;
+	padding-bottom: 2px;
+}
+</style>
+
+<meta name="Keywords" content="javascript, xml, jscript, script, xparse, msxml, parser, jsxml, extensible, rexml, iterator, peter, tracey, regular, expression, expressions, w3c">
+<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.">
+
+<style type="text/css"></style></head>
+
+<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
+<!-- * header * -->
+<table cellspacing="0" cellpadding="0" width="100%" height="100%"><tbody><tr><td valign="top" class="navpane">
+
+<b>Home</b><br>
+<a href="http://www.petetracey.com/jsxml/documentation.html">Documentation</a><br>
+<a href="http://www.petetracey.com/jsxml/download.html">Download</a><br>
+<br><br>
+<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>
+<br><br>
+<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>
+<br><br>
+</td><td class="contentspane" valign="top">
+<!-- * /header * -->
+
+
+<form name="Form">
+<span style="font-size: 14px; font-weight: 600;">JSXML XML Tools</span>
+<br><br>
+<span style="font-size: 12px; font-weight: 600;">
+Version 1.3<br>
+JavaScript XML Library, released under the LGPL license - created by <a href="http://www.levelthreesolutions.com/" target="_top">Level Three Solutions</a><br><br>
+</span>
+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.
+<br><br>
+JSXML includes
+<ul>
+<li>REXML - a light-weight regular expression-based XML parser
+<ul>
+	<li> Gives you programatic access to XML documents.
+	</li><li> Integrates with the JSXMLBuilder and JSXMLIterator
+	</li><li> The fastest JavaScript XML Parser available
+</li></ul>
+</li><li>REXML Lite - a stripped down version of REXML
+<ul>
+	<li> Whitespace has been removed and internal variables renamed - file size is 1.9 KB!
+	</li><li> No support for text, cdata, and pi elements  (however text is still accessible through the text property of an element).
+	</li><li> Text property of elements doesn't include text of that element's children
+	</li><li> Interchangable with REXML, as long as no unsupported functions are accessed
+</li></ul>
+</li><li>JSXMLBuilder - a flat interface to modify XML
+<ul>
+	<li> JSXMLBuilder makes it easier to program GUIs that leverage the flexibility of XML<br>
+	To tree or not to tree?<br>
+	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.
+	</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.
+</li></ul>
+</li><li>JSXMLIterator - a tool to iterate the tree structure of a REXML object without using recursion
+</li></ul>
+
+<br>
+<br>
+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):
+
+<br><br>
+<table>
+<tbody><tr>
+<td>
+Figure 1:<br>
+<a href="./jsxml-index_files/xmlparse.gif" target="_new"><img src="./jsxml-index_files/xmlparse.gif" border="1" width="550"></a>
+</td>
+<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>
+</tr>
+</tbody></table>
+<br><br>
+Figure 2:<br>
+<a href="./jsxml-index_files/xmlparse2.gif" target="_new"><img src="./jsxml-index_files/xmlparse2.gif" border="1" width="550"></a>
+
+<br><br>
+<b><a href="http://www.jeremie.com/Dev/XML/index.jer" target="_top">Xparse</a> (V .91)<br>
+<a href="http://xmljs.sourceforge.net/" target="_top">XML For Script</a> (V .22)</b>
+<br><br>
+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.
+<br><br>
+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>
+<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>
+
+
+<br>
+<br>
+</form></td></tr></tbody></table>
+
+
+</body></html>
Index: /XmlTools2/trunk/readme.txt
===================================================================
--- /XmlTools2/trunk/readme.txt	(revision 960)
+++ /XmlTools2/trunk/readme.txt	(revision 961)
@@ -62,9 +62,10 @@
 Change Log:
 ----------------------------------
-2.0a, 15-02-2014
+2.0a, 20-02-2014
 -Added multithreading support for @CUSTOM_COMMAND, use wildcards in multiple files for the same js code to 
 take advantage of this (performance may increase over 2.5 times)
 -Now a warning is given if a user javascript code (@CUSTOM_COMMAND) takes too much time to finish
 -Fixed small bug when applying patches with @COMMAND + --no-verbose where some std output should not be displayed
+-Added double single quotes in @COMMAND to allow single quotes in XPath expressions
 ----------------------------------
 2.0, 08-02-2014
