<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Asfak&#039;s Blog</title>
	<atom:link href="http://asfak.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://asfak.wordpress.com</link>
	<description>- asfak writes here.</description>
	<lastBuildDate>Mon, 06 Sep 2010 08:42:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='asfak.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Asfak&#039;s Blog</title>
		<link>http://asfak.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://asfak.wordpress.com/osd.xml" title="Asfak&#039;s Blog" />
	<atom:link rel='hub' href='http://asfak.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Building a Axis2 Webservice and a client with eclipse europa in 9 steps.</title>
		<link>http://asfak.wordpress.com/2010/09/06/building-a-axis2-webservice-and-a-client-with-eclipse-europa-in-9-steps/</link>
		<comments>http://asfak.wordpress.com/2010/09/06/building-a-axis2-webservice-and-a-client-with-eclipse-europa-in-9-steps/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 08:42:14 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[axis2]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=200</guid>
		<description><![CDATA[This link is from my another blog which is now under construction. There I have given 9 simple steps to build an axis2 webservice and a client to use that web service. http://ongkoor.blogspot.com/2010/09/axis2-webservice-with-eclipse-europa-in.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=200&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This link is from my another blog which is now under construction.</p>
<p>There I have given 9 simple steps to build an axis2 webservice and a client to use that web service.</p>
<p><a href="http://ongkoor.blogspot.com/2010/09/axis2-webservice-with-eclipse-europa-in.html">http://ongkoor.blogspot.com/2010/09/axis2-webservice-with-eclipse-europa-in.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=200&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2010/09/06/building-a-axis2-webservice-and-a-client-with-eclipse-europa-in-9-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>Link:  Cursor (caret) sometimes fails to appear in input or textarea</title>
		<link>http://asfak.wordpress.com/2010/01/26/link-cursor-caret-sometimes-fails-to-appear-in-input-or-textarea/</link>
		<comments>http://asfak.wordpress.com/2010/01/26/link-cursor-caret-sometimes-fails-to-appear-in-input-or-textarea/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 09:14:37 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=188</guid>
		<description><![CDATA[Link: https://bugzilla.mozilla.org/show_bug.cgi?id=167801 Look at comment 112. copied and pasted from the link I&#8217;ve had this problem in FF3 but this time not related to iframe or overflow setting but because of disabling input for a moment. If someone stumbles upon same issue, this may help: Testcase to reproduce problem: textarea.disabled = true; setTimeout(function() { textarea.disabled [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=188&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Link: https://bugzilla.mozilla.org/show_bug.cgi?id=167801<br />
Look at comment 112.</p>
<p>copied and pasted from the link</p>
<blockquote><p>
I&#8217;ve had this problem in FF3 but this time not related to iframe or overflow<br />
setting but because of disabling input for a moment.</p>
<p>If someone stumbles upon same issue, this may help:<br />
<code><br />
Testcase to reproduce problem:<br />
textarea.disabled = true;<br />
setTimeout(function() {<br />
  textarea.disabled = false;<br />
  textarea.focus();<br />
}, 0);<br />
</code><br />
How to fix it:<br />
<code></p>
<p>textarea.blur(); // blur first<br />
textarea.disabled = true;<br />
setTimeout(function() {<br />
  textarea.disabled = false;<br />
  textarea.focus();<br />
}, 0);</p>
<p></code></p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=188&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2010/01/26/link-cursor-caret-sometimes-fails-to-appear-in-input-or-textarea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>Link: Roman to decimal in xslt 1.0 and 2.0</title>
		<link>http://asfak.wordpress.com/2010/01/17/link-roman-to-decimal-in-xslt-1-0-and-2-0/</link>
		<comments>http://asfak.wordpress.com/2010/01/17/link-roman-to-decimal-in-xslt-1-0-and-2-0/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 05:49:04 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=186</guid>
		<description><![CDATA[Link : http://gandhimukul.tripod.com/xslt/numbers.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=186&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Link : http://gandhimukul.tripod.com/xslt/numbers.html</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/186/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=186&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2010/01/17/link-roman-to-decimal-in-xslt-1-0-and-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>With jQuery write in one input field and that will fill another input field unless @ is typed.</title>
		<link>http://asfak.wordpress.com/2009/12/29/write-in-one-input-field-and-that-will-fill-another-input-field-unless-is-typed/</link>
		<comments>http://asfak.wordpress.com/2009/12/29/write-in-one-input-field-and-that-will-fill-another-input-field-unless-is-typed/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 06:02:44 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=180</guid>
		<description><![CDATA[I want to fill &#60;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;username&#8221;/&#62; with whatever I write in &#60;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;email&#8221;/&#62; unless I write &#8216;@&#8217;. If I write &#8216;@&#8217; in &#60;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;email&#8221;/&#62; then &#60;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;username&#8221;/&#62; will stop writing text. &#60;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;email&#8221;/&#62; &#60;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;username&#8221;/&#62; with jQuery we can do it simply jQuery('.email').keyup(function [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=180&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I want to fill &lt;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;username&#8221;/&gt; with whatever I write in &lt;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;email&#8221;/&gt; unless I write &#8216;@&#8217;. If I write &#8216;@&#8217; in &lt;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;email&#8221;/&gt; then &lt;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;username&#8221;/&gt; will stop writing text.</p>
<p>&lt;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;email&#8221;/&gt;</p>
<p>&lt;input type=&#8221;text&#8221; size=&#8221;20&#8243; class=&#8221;username&#8221;/&gt;</p>
<p>with jQuery we can do it simply</p>
<p><code><br />
jQuery('.email').keyup(function (e) {<br />
        var index = text.indexOf('@');<br />
	if (index == -1) {<br />
		jQuery('.username').val(text);<br />
	}else if (index) {<br />
		jQuery('.username').val(text.substring(0, index));<br />
	}<br />
});<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=180&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2009/12/29/write-in-one-input-field-and-that-will-fill-another-input-field-unless-is-typed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;No more DTM IDs are available&#8221; if this is the exception from xalan</title>
		<link>http://asfak.wordpress.com/2009/12/12/no-more-dtm-ids-are-available-if-this-is-the-exception-from-xalan/</link>
		<comments>http://asfak.wordpress.com/2009/12/12/no-more-dtm-ids-are-available-if-this-is-the-exception-from-xalan/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 11:37:14 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=176</guid>
		<description><![CDATA[Remedy is http://www.mail-archive.com/xalan-j-users@xml.apache.org/msg04890.html copy and paste from the above link [ Hello, Erik. I was struggling with this problem back in November 2005, but after some poking around I found a one-line change that has eliminated all "No more DTM IDs" errors on my project. I unpacked xalan_2_7_0.jar and in src/org/apache/xml/dtm/DTMManager.java, line 362, I found, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=176&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Remedy is</p>
<p><a href="http://www.mail-archive.com/xalan-j-users@xml.apache.org/msg04890.html">http://www.mail-archive.com/xalan-j-users@xml.apache.org/msg04890.html</a></p>
<p>copy and paste from the above link</p>
<p>[</p>
<pre>Hello, Erik.   

I was struggling with this problem back in November 2005, but after some
poking around I found a one-line change that has eliminated all "No more
DTM IDs" errors on my project.

I unpacked xalan_2_7_0.jar and in
src/org/apache/xml/dtm/DTMManager.java, line 362, I found, read, and (I
hope) understood this comment:

  /** This value, set at compile time, controls how many bits of the
   * DTM node identifier numbers are used to identify a node within a
   * document, and thus sets the maximum number of nodes per
   * document. The remaining bits are used to identify the DTM
   * document which contains this node.
   *
   * If you change IDENT_DTM_NODE_BITS, be sure to rebuild _ALL_ the
   * files which use it... including the IDKey testcases.
   *
   * (FuncGenerateKey currently uses the node identifier directly and
   * thus is affected when this changes. The IDKEY results will still be
   * _correct_ (presuming no other breakage), but simple equality
   * comparison against the previous "golden" files will probably
   * complain.)
   * */

I then changed the following constant's value from 16 to 12.

  public static final int IDENT_DTM_NODE_BITS = 12;

Then I added a little static initializer purely to convince myself that
my webserver actually found my copy of xalan.jar

  static {
     System.out.println(" IDENT_DTM_NODE_BITS: "+ IDENT_DTM_NODE_BITS );
  }

My understanding of this change is that I gave up four (16-12) bits
worth of IDs for identifying documents, in exchange for four more bits
of node IDs within each document.  I cannot imagine in my app needing
more than 2^12 (4096) document IDs, but I certainly need more than 2^16
(65536) worth of nodes within a document.  Now I can have up to 2^20
(1,048,576) nodes per document.

Now, maybe some more knowledgable xalan developers can answer this:  In
the above comment, it says: " If you change IDENT_DTM_NODE_BITS, be sure
to rebuild _ALL_ the files which use it... including the IDKey
testcases.".  Now, I did rebuild the entire package, which I am sure
satisfies that requirement, but why does it have to be a compile-time
setting?   Since other classes would have to refer to
DTMManager.IDENT_DTM_NODE_BITS (AFAIK, referring to a final variable
like this doesn't actually COPY the value into the other classes, or
does it?)   Would it not also work to provide 16 as a default, but allow
it to be overridden, like this?

    public static final int IDENT_DTM_NODE_BITS = 

Integer.parseInt(System.getProperty("org.apache.xml.dtm.DTMManager.IDENT
_DTM_NODE_BITS"), "16");

Then people who need another value can simply start their app with
  -Dorg.apache.xml.Dorg.apache.xml.dtm.DTMManager.IDENT_DTM_NODE_BITS=12
on the command line and be done with it.

If there is a downside to what I have done, PLEASE discuss!  So far, I
do not see one!

tlj

Timothy Jones - Sr. Systems Engineer, Development
(813) 637-5366 - Syniverse Technologies
Learn a new language, grow a new soul, live a new life.</pre>
<p>]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=176&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2009/12/12/no-more-dtm-ids-are-available-if-this-is-the-exception-from-xalan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>JSTL Error: According to TLD or attribute directive in tag file, attribute items does not accept any expressions</title>
		<link>http://asfak.wordpress.com/2009/09/15/jstl-error-according-to-tld-or-attribute-directive-in-tag-file-attribute-items-does-not-accept-any-expressions/</link>
		<comments>http://asfak.wordpress.com/2009/09/15/jstl-error-according-to-tld-or-attribute-directive-in-tag-file-attribute-items-does-not-accept-any-expressions/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 07:24:57 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[Jstl]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=157</guid>
		<description><![CDATA[If you get the error from your jsp file then you might have done an &#8220;accidental mix and match JSTL versions&#8221; See the link [☼ http://3.ly/lmk] So what you will have to do is Just change &#60;%@ taglib uri=&#8221;http://java.sun.com/jstl/core&#8221; prefix=&#8221;c&#8221;%&#62;           to &#60;%@ taglib uri=&#8221;http://java.sun.com/jsp/jstl/core&#8221; prefix=&#8221;c&#8221;%&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=157&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you get the error from your jsp file then you might have done an</p>
<p>&#8220;accidental mix and match JSTL versions&#8221;</p>
<p>See the link [☼ http://3.ly/lmk]</p>
<p>So what you will have to do is</p>
<p>Just change</p>
<p>&lt;%@ taglib uri=&#8221;http://java.sun.com/jstl/core&#8221; prefix=&#8221;c&#8221;%&gt;           to</p>
<p>&lt;%@ taglib uri=&#8221;http://java.sun.com/jsp/jstl/core&#8221; prefix=&#8221;c&#8221;%&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=157&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2009/09/15/jstl-error-according-to-tld-or-attribute-directive-in-tag-file-attribute-items-does-not-accept-any-expressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to Hibernate &#8211; A good tutorial to follow.</title>
		<link>http://asfak.wordpress.com/2009/09/14/introduction-to-hibernate-a-good-tutorial-to-follow/</link>
		<comments>http://asfak.wordpress.com/2009/09/14/introduction-to-hibernate-a-good-tutorial-to-follow/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 06:55:58 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=155</guid>
		<description><![CDATA[If you are a Java progrmmer, your favourite IDE is Eclipse and you want to learn Hibernate then I will suggest you to follow the link http://www.vaannila.com/hibernate/hibernate-tutorial/hibernate-tutorial.html This is a very nice tutorial for anyone who wants to test hibernate in eclipse. Just follow all the examples. Last page of every section includes a very [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=155&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are a Java progrmmer, your favourite IDE is Eclipse and you want to learn Hibernate then I will suggest you to follow the link</p>
<p>http://www.vaannila.com/hibernate/hibernate-tutorial/hibernate-tutorial.html</p>
<p>This is a very nice tutorial for anyone who wants to test hibernate in eclipse.</p>
<p>Just follow all the examples. Last page of every section includes a very simple source code.</p>
<p><a href="/scala-eclipse-workspace/hibernateDemo6ManyToMany/lib/"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=155&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2009/09/14/introduction-to-hibernate-a-good-tutorial-to-follow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to Cellular Automata</title>
		<link>http://asfak.wordpress.com/2009/09/09/introduction-to-cellular-automata/</link>
		<comments>http://asfak.wordpress.com/2009/09/09/introduction-to-cellular-automata/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 09:02:26 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[Cellular Automata]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=151</guid>
		<description><![CDATA[This is an old presentation that I took for my office seminar.  Recently I uploaded the presentation in .pdf format. http://www.slideshare.net/asfak/cellular-automata-1971307 For .ppt file Cellular Automata Presentation file .ppt<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=151&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is an old presentation that I took for my office seminar.  Recently I uploaded the presentation in .pdf format.</p>
<p>http://www.slideshare.net/asfak/cellular-automata-1971307</p>
<p>For .ppt file</p>
<p><a href="http://www.fileden.com/getfile.php?file_path=http://www.fileden.com/files/2009/11/3/2636043/CellularAutomata-2009-05-26.rar"> Cellular Automata Presentation file .ppt </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=151&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2009/09/09/introduction-to-cellular-automata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to Erlang</title>
		<link>http://asfak.wordpress.com/2009/09/09/introduction-to-erlang/</link>
		<comments>http://asfak.wordpress.com/2009/09/09/introduction-to-erlang/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 08:59:36 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[Erlang]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=149</guid>
		<description><![CDATA[This is a presentation that I took on August 2008 for my office seminar. Recently I uploaded the presentation file in .pdf format. http://www.slideshare.net/asfak/erlang-1971533 &#160; For .ppt file please visit &#160; &#160; Erlang presentation .ppt file<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=149&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a presentation that I took on August 2008 for my office seminar. Recently I uploaded the presentation file in .pdf format.</p>
<p>http://www.slideshare.net/asfak/erlang-1971533</p>
<p>&nbsp;</p>
<p>For .ppt file please visit</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://www.fileden.com/getfile.php?file_path=http://www.fileden.com/files/2009/11/3/2636043/Presentation_August_12_2008_for_Office_Seminar.rar">Erlang presentation .ppt file</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=149&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2009/09/09/introduction-to-erlang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
		<item>
		<title>Escaping or Unescaping special characters while writing XML files using dom4j</title>
		<link>http://asfak.wordpress.com/2009/08/29/escaping-or-unescaping-special-characters-while-writing-xml-files-using-dom4j/</link>
		<comments>http://asfak.wordpress.com/2009/08/29/escaping-or-unescaping-special-characters-while-writing-xml-files-using-dom4j/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 09:56:33 +0000</pubDate>
		<dc:creator>asfak</dc:creator>
				<category><![CDATA[dom4j]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://asfak.wordpress.com/?p=127</guid>
		<description><![CDATA[Special Thanks: I should give a cordial thanks to Mahbub Shahriar (Project Manager, KAZ Software Ltd. Bangladesh) for finding out the solution for this problem. Problem: Sometimes it is required to keep the special characters same in the output XML file as in the input XML file. Solution: For example: input.xml &#60;?xml version="1.0" encoding="UTF-8"?&#62; &#60;abc&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=127&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Special Thanks:</strong></p>
<p>I should give a cordial thanks to <strong>Mahbub Shahriar</strong> (Project Manager, KAZ Software Ltd. Bangladesh) for finding out the solution for this problem.</p>
<p><strong>Problem:</strong></p>
<p>Sometimes it is required to keep the special characters same in the output XML file as in the input XML file.</p>
<p><strong>Solution:</strong></p>
<p>For example:</p>
<p>input.xml</p>
<p><code><br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;abc&gt;<br />
&lt;def&gt;'single quotation' "double quotation" Apostrophe' Apostrophe&amp;apos; &amp;quot;Quotation&amp;quot; A&amp;amp;B&lt;/def&gt;<br />
&lt;/abc&gt;</code></p>
<p>We want output should be as it is in the output. That is special characters should not be changed and also the characters single quotation (&#8216;), double quotation (&#8220;) should also not be changed.</p>
<p>If we read the input xml file (input.xml) file by the following way</p>
<p><code><br />
SAXReader reader = new SAXReader();//DEFAULT SAXReader is used.<br />
reader.setValidation(false);<br />
reader.setFeature(feature, false);<br />
Document inputDoc = reader.read("input/input.xml");<br />
</code></p>
<p>Reader will read &amp;quote; as &#8221; and &#8216; as &#8216; and when it will be written to the output file special characters will not be seen.</p>
<p>A little trick is used in the following Java program so that this problem is resolved. There you will see MySAXParser() is used as argument which extends SAXParser().<br />
<code><br />
//LOOK !! Here default is not taken.<br />
SAXReader reader = new SAXReader(new MySAXParser());<br />
reader.setValidation(false);<br />
reader.setFeature(feature, false);<br />
Document inputDoc = reader.read("input/input.xml");<br />
</code></p>
<p><code><br />
//MySAXParser.java<br />
public class MySAXParser extends SAXParser {</code></p>
<p>private String entityNane;</p>
<p>@Override<br />
public void characters(XMLString text, Augmentations augs) throws XNIException {<br />
if (this.entityNane != null) {<br />
char[] charArray = this.entityNane.toCharArray();</p>
<p>text.setValues(charArray, 0, charArray.length);</p>
<p>this.entityNane = null;<br />
}<br />
super.characters(text, augs);<br />
}</p>
<p>@Override<br />
public void startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException {<br />
super.startGeneralEntity(name, identifier, encoding, augs);</p>
<p>this.entityNane = &#8220;&amp;&#8221; + name + &#8220;;&#8221;;<br />
}<br />
}</p>
<p><strong>So now what&#8217;s the trick here in MySAXParser.java?</strong></p>
<p>Normally all texts in the XML file is run through the method</p>
<p><code>public void characters(</code></p>
<p>but if special characters are encountered then the method</p>
<p><code>public void startGeneralEntity(</code></p>
<p>is called first and then <code>public void characters(</code> is called.</p>
<p>Here the trick is done. The trick is very easy.</p>
<p><strong>Jar-files:</strong></p>
<p>dom4j-1.5.1.jar<br />
jaxen-1.1-beta-8.jar<br />
xercesImpl.jar</p>
<p><strong>Source Codes:</strong><br />
<code><br />
//ADom4jDemoMain.java</code></p>
<p>import java.io.File;<br />
import java.io.FileOutputStream;<br />
import java.io.OutputStreamWriter;</p>
<p>import org.dom4j.Document;<br />
import org.dom4j.io.OutputFormat;<br />
import org.dom4j.io.SAXReader;<br />
import org.dom4j.io.XMLWriter;<br />
import org.dom4j.tree.FlyweightProcessingInstruction;</p>
<p>public class ADom4jDemoMain {</p>
<p>public static String feature = &#8220;http://apache.org/xml/features/nonvalidating/load-external-dtd&#8221;;</p>
<p>public static void main(String[] args) {</p>
<p>//This will change in the output<br />
try {<br />
SAXReader reader = new SAXReader();//LOOK HERE DEFAULT SAXReader is read.<br />
reader.setValidation(false);<br />
reader.setFeature(feature, false);<br />
Document inputDoc = reader.read(&#8220;input/input.xml&#8221;);<br />
writeDocument(inputDoc, new File(&#8220;output/changed_output.xml&#8221;));<br />
}catch(Exception e) {<br />
e.printStackTrace();<br />
}</p>
<p>//This WILL NOT change in the output.<br />
try {<br />
SAXReader reader = new SAXReader(new MySAXParser());//LOOK !! Here default is not taken.<br />
reader.setValidation(false);<br />
reader.setFeature(feature, false);<br />
Document inputDoc = reader.read(&#8220;input/input.xml&#8221;);<br />
writeDocument(inputDoc, new File(&#8220;output/same_output.xml&#8221;));<br />
}catch(Exception e) {<br />
e.printStackTrace();<br />
}</p>
<p>}</p>
<p>public synchronized static void writeDocument(Document doc, File df) {<br />
System.out.println((df.exists() ? &#8220;Overwriting&#8221; : &#8220;Creating&#8221;) + &#8221; file &#8211; &#8221; + df);<br />
df.getParentFile().mkdirs();<br />
try {<br />
OutputFormat format = OutputFormat.createPrettyPrint();<br />
format.setIndentSize(4);<br />
XMLWriter writer = new XMLWriter(new OutputStreamWriter(new FileOutputStream(df), &#8220;UTF-8&#8243;),format);<br />
FlyweightProcessingInstruction xmlDeclaration = new FlyweightProcessingInstruction(&#8220;xml&#8221;,<br />
&#8220;version=\&#8221;1.0\&#8221; encoding=\&#8221;UTF-8\&#8221;");<br />
writer.setEscapeText(false);//Look escaping is turned off from writer.<br />
writer.write(xmlDeclaration);<br />
writer.write(doc.processingInstructions());<br />
writer.write(doc.getDocType());<br />
writer.write(doc.getRootElement());<br />
writer.close();</p>
<p>} catch (Exception e) {<br />
e.printStackTrace();<br />
}<br />
}<br />
}</p>
<p><code><br />
//MySAXParser.java</code></p>
<p>import org.apache.xerces.parsers.SAXParser;<br />
import org.apache.xerces.xni.Augmentations;<br />
import org.apache.xerces.xni.XMLResourceIdentifier;<br />
import org.apache.xerces.xni.XMLString;<br />
import org.apache.xerces.xni.XNIException;</p>
<p>public class MySAXParser extends SAXParser {</p>
<p>private String entityNane;</p>
<p>@Override<br />
public void characters(XMLString text, Augmentations augs) throws XNIException {<br />
if (this.entityNane != null) {<br />
char[] charArray = this.entityNane.toCharArray();<br />
text.setValues(charArray, 0, charArray.length);</p>
<p>this.entityNane = null;<br />
}<br />
super.characters(text, augs);<br />
}</p>
<p>@Override<br />
public void startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException {<br />
super.startGeneralEntity(name, identifier, encoding, augs);</p>
<p>this.entityNane = &#8220;&amp;&#8221; + name + &#8220;;&#8221;;<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/asfak.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/asfak.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/asfak.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/asfak.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/asfak.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/asfak.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/asfak.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/asfak.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/asfak.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/asfak.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/asfak.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/asfak.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/asfak.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/asfak.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=asfak.wordpress.com&amp;blog=1992599&amp;post=127&amp;subd=asfak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://asfak.wordpress.com/2009/08/29/escaping-or-unescaping-special-characters-while-writing-xml-files-using-dom4j/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1f7e2d84672b48df4dff1fe3f545c83?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">asfak</media:title>
		</media:content>
	</item>
	</channel>
</rss>
