<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: GWT XML Indenter/Formatter</title>
	<atom:link href="http://hawflakes.unoc.net/?feed=rss2&#038;p=79" rel="self" type="application/rss+xml" />
	<link>http://hawflakes.unoc.net/?p=79</link>
	<description>Side Projects, Hobbies, Media, Fun</description>
	<lastBuildDate>Thu, 01 Jul 2010 19:43:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jon</title>
		<link>http://hawflakes.unoc.net/?p=79&#038;cpage=1#comment-16</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Mon, 05 Jan 2009 09:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://hawflakes.unoc.net/?p=79#comment-16</guid>
		<description>Thanks a lot for the comments.

Just some comments and some questions. &lt;blockquote cite=&quot;#commentbody-14&quot;&gt;
Lack of spaces between concatenations and parameter separations. 

Lack of temporary variable / for each loop (dunno if that’s possible here, my Java knowledge is limited) in the attribute loop.
&lt;/blockquote&gt;
Some of these are partly due to the way my wordpress formatter is misbehaving. It didn&#039;t like the &quot;&lt; &quot; in my for loops. The others are simply that I was lazy. I just wanted to make the snippet available. It&#039;s not optimized at all. Just short and easy to understand.

Temporary variables would certainly make it more efficient, but to me it makes the code a little harder to just skim through. The attribute loop is actually an unfortunate circumstance of java. In IE, it seems to work well if I just run getAttributes().toString(). However in Firefox, it lacks the necessary spaces between each of the attributes, and so I resorted to adding in an extra loop. In case anyone wants to fix the snippet and use temporary variables, you should probably reference the NodeMap of attributes, perhaps in addition to referencing to the attribute node.

&lt;blockquote cite=&quot;#commentbody-15&quot;&gt;
&lt;p&gt;Well for one you might want to use a StringBuilder.&lt;/p&gt;




I would be interesting in seeing if anyone has run any tests on String vs StringBuilder in GWT. In theory StringBuilder should be more efficient, but I&#039;m not sure how it&#039;s been implemented in javascript. Either way, it&#039;s probably more memory efficient, which I should probably keep in mind because GWT can get somewhat heavy.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the comments.</p>
<p>Just some comments and some questions.<br />
<blockquote cite="#commentbody-14">
Lack of spaces between concatenations and parameter separations. </p>
<p>Lack of temporary variable / for each loop (dunno if that’s possible here, my Java knowledge is limited) in the attribute loop.
</p></blockquote>
<p>Some of these are partly due to the way my wordpress formatter is misbehaving. It didn&#8217;t like the &#8220;< " in my for loops. The others are simply that I was lazy. I just wanted to make the snippet available. It's not optimized at all. Just short and easy to understand.</p>
<p>Temporary variables would certainly make it more efficient, but to me it makes the code a little harder to just skim through. The attribute loop is actually an unfortunate circumstance of java. In IE, it seems to work well if I just run getAttributes().toString(). However in Firefox, it lacks the necessary spaces between each of the attributes, and so I resorted to adding in an extra loop. In case anyone wants to fix the snippet and use temporary variables, you should probably reference the NodeMap of attributes, perhaps in addition to referencing to the attribute node.</p>
<blockquote cite="#commentbody-15">
<p>Well for one you might want to use a StringBuilder.</p>
<p>I would be interesting in seeing if anyone has run any tests on String vs StringBuilder in GWT. In theory StringBuilder should be more efficient, but I&#8217;m not sure how it&#8217;s been implemented in javascript. Either way, it&#8217;s probably more memory efficient, which I should probably keep in mind because GWT can get somewhat heavy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Auke</title>
		<link>http://hawflakes.unoc.net/?p=79&#038;cpage=1#comment-15</link>
		<dc:creator>Auke</dc:creator>
		<pubDate>Sat, 03 Jan 2009 22:34:03 +0000</pubDate>
		<guid isPermaLink="false">http://hawflakes.unoc.net/?p=79#comment-15</guid>
		<description>Well for one you might want to use a StringBuilder.</description>
		<content:encoded><![CDATA[<p>Well for one you might want to use a StringBuilder.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark S. Rasmussen</title>
		<link>http://hawflakes.unoc.net/?p=79&#038;cpage=1#comment-14</link>
		<dc:creator>Mark S. Rasmussen</dc:creator>
		<pubDate>Sat, 03 Jan 2009 17:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://hawflakes.unoc.net/?p=79#comment-14</guid>
		<description>As for code style I&#039;d prefer something like this (semi-pseudo code):
http://pastebin.com/f7f14bbbf

I really dislike the inconsistent usage of curlies. Lack of spaces between concatenations and parameter separations. Lack of temporary variable / for each loop (dunno if that&#039;s possible here, my Java knowledge is limited) in the attribute loop.</description>
		<content:encoded><![CDATA[<p>As for code style I&#8217;d prefer something like this (semi-pseudo code):<br />
<a href="http://pastebin.com/f7f14bbbf" rel="nofollow">http://pastebin.com/f7f14bbbf</a></p>
<p>I really dislike the inconsistent usage of curlies. Lack of spaces between concatenations and parameter separations. Lack of temporary variable / for each loop (dunno if that&#8217;s possible here, my Java knowledge is limited) in the attribute loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://hawflakes.unoc.net/?p=79&#038;cpage=1#comment-13</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Thu, 01 Jan 2009 22:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://hawflakes.unoc.net/?p=79#comment-13</guid>
		<description>&lt;a href=&quot;#comment-12&quot; rel=&quot;nofollow&quot;&gt;@caustic&lt;/a&gt; 
It would be nice if you explained your comment, it&#039;s somewhat unclear how I should make improvements.</description>
		<content:encoded><![CDATA[<p><a href="#comment-12" rel="nofollow">@caustic</a><br />
It would be nice if you explained your comment, it&#8217;s somewhat unclear how I should make improvements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: caustic</title>
		<link>http://hawflakes.unoc.net/?p=79&#038;cpage=1#comment-12</link>
		<dc:creator>caustic</dc:creator>
		<pubDate>Thu, 01 Jan 2009 17:50:57 +0000</pubDate>
		<guid isPermaLink="false">http://hawflakes.unoc.net/?p=79#comment-12</guid>
		<description>Your code would not pass my review.</description>
		<content:encoded><![CDATA[<p>Your code would not pass my review.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
