Index: XmlTools2/examples/BINACJBOCharacter.oni-patch
===================================================================
--- XmlTools2/examples/BINACJBOCharacter.oni-patch	(revision 919)
+++ XmlTools2/examples/BINACJBOCharacter.oni-patch	(revision 920)
@@ -1,15 +1,17 @@
+#########################################################################################
+############################## XmlTools Patch File Example ##############################
+#########################################################################################
+
+########## Comments in patch files begin with '#'
+
+########## You can comment and uncomment commands to see their effect 
+########## in BINACJBOCharacter.xml file
+
+# The following row is always required in a XmlTools patch. 
+# It defines the minimum version of XmlTools executable that it requires.
 @XML_TOOLS Version "2.0"
 
-#@ADD_INSIDE_NODE ElementName "Particles"
-<xml>
-             <Particle>
-                 <Start>0</Start>
-                 <End>45</End>
-                 <Bone>Head</Bone>
-                 <Name>glass_break</Name>
-             </Particle>
-</xml>
-
-@ADD_INSIDE_NODE ElementName "OSD" Files "BINACJBOCharacter-van.xml"
+# This command adds a new XML node (inside of <xml></xml> tags) to all OSD named nodes.
+@ADD_INSIDE_NODES ElementName "OSD" Files "BINACJBOCharacter.xml"
 <xml>
 		<Attack>
@@ -28,73 +30,41 @@
 </xml>
 
-#@ADD_INSIDE_NODE ElementName "Attacks"
+# This command removes the nodes inserted in the previous command using ElementName and ParentElementName.
+@REMOVE_NODES ElementName "Attack" ParentElementName "OSD" Files "BINACJBOCharacter.xml"
+
+# This command adds a new XML node (inside of <xml></xml> tags) to the nodes that matches the XPathExpression.
+@ADD_INSIDE_NODES XPathExpression "/Oni/Objects/CHAR/OSD" Files "BINACJBOCharacter.xml"
 <xml>
-				<Attack>
-                 <Start>31</Start>
-                 <End>44</End>
-                 <Bones>Chest Neck LeftShoulder RightShoulder</Bones>
-                 <Flags>Unblockable</Flags>
-                 <Knockback>0</Knockback>
-                 <HitPoints>5</HitPoints>
-                 <HitType>HitBody</HitType>
-                 <HitLength>40</HitLength>
-                 <StunLength>0</StunLength>
-                 <StaggerLength>0</StaggerLength>
-                 <Extents />
-             </Attack>
+		<Attack>
+			<Start>0</Start>
+			<End>30</End>
+			<Bones>Pelvis Chest Neck Head LeftShoulder LeftArm LeftWrist LeftFist RightShoulder RightArm RightWrist RightFist</Bones>
+			<Flags>Unblockable</Flags>
+			<Knockback>0</Knockback>
+			<HitPoints>10</HitPoints>
+			<HitType>KnockdownBody</HitType>
+			<HitLength>0</HitLength>
+			<StunLength>0</StunLength>
+			<StaggerLength>0</StaggerLength>
+			<Extents/>
+		</Attack>
 </xml>
 
-#@ADD_INSIDE_NODE ElementName "Animation"
-<xml>
-         <AttackRing>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-             <Length>0</Length>
-         </AttackRing>
-</xml>
+# This command removes the nodes inserted in the previous command using an XPathExpression.
+@REMOVE_NODES XPathExpression "/Oni/Objects/CHAR/OSD/Attack" Files "BINACJBOCharacter.xml"
 
-#@REMOVE_NODE ElementName "Objects" ParentElementName "Oni" Files "BINACJBOCharacter-van.xml"
+# This command executes any of the XmlTools commands (see all possible command using XmlTools --help)
+@COMMAND Arguments "--files 'BINACJBOCharacter.xml' --element-name 'Position' --invert-elements"
 
-#@COMMAND "-?"
+# This command executes the javascript inside the (inside of <code></code> tags)
 
-#@CUSTOM_CODE Files "BINACJBOCharacter-van.xml"
+# The current javascript code first gets the element name "CHAR" with an attribute Id=11565
+# then it gets the child element "OSD" and set its Weapon element value to "MyAwesomeOniWeapon"
+@CUSTOM_CODE Files "BINACJBOCharacter.xml"
 <code>
-  var myBuilder = new JSXMLBuilder();
- myBuilder.load($xmlData);
+	var myBuilder = new JSXMLBuilder();
+	myBuilder.load($xmlData);
 
- var elements = myBuilder.elements;
+	var elements = myBuilder.elements;
  
 	for (var i = 0; i < elements.length; i++) {
