Author: jonathan Date: Tue Jul 8 12:51:01 2008 New Revision: 18996 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18996
Log: Improvement in illustrating tricky delete operator. Modified: trunk/mashup/java/xdocs/e4xquickstart.html Modified: trunk/mashup/java/xdocs/e4xquickstart.html URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/e4xquickstart.html?rev=18996&r1=18995&r2=18996&view=diff ============================================================================== --- trunk/mashup/java/xdocs/e4xquickstart.html (original) +++ trunk/mashup/java/xdocs/e4xquickstart.html Tue Jul 8 12:51:01 2008 @@ -484,8 +484,9 @@ <p>The value of an element or attribute can be changed by assigning a new value to it:</p> <pre class="Code">[EMAIL PROTECTED] = 1235;<br/>c.phone.(@type='mobile') = "650-555-1234";</pre> <p>Deleting an XML element or attribute from a structure is accomplished with the delete - operator:</p> -<pre class="Code">delete c.phone.(@type='office');</pre> + operator (though watch out that you're operating on a single node rather than simply + removing an item from a transitory list):</p> +<pre class="Code">delete c.phone.(@type='office')[0];</pre> <p>If one wishes to add an child, one can use the += operator to insert a new element at a particular location:</p> <pre class="Code">c.phone += <phone type='home'>650-555-1414</phone>; // append new phone child. _______________________________________________ Mashup-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev
