<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Like innerHTML, except not as broken</title>
	<link>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/</link>
	<description>code shanty</description>
	<pubDate>Wed,  7 Jan 2009 00:44:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: TJ Maciak</title>
		<link>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-8398</link>
		<author>TJ Maciak</author>
		<pubDate>Mon, 29 Sep 2008 21:14:28 +0000</pubDate>
		<guid>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-8398</guid>
		<description>&lt;p&gt;good thing I proof read.  The tag I was talking about is &#38; nbsp; (put together - otherwise your comments render it as a space - as it should!) :)&lt;/p&gt;

&lt;p&gt;TJ&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>good thing I proof read.  The tag I was talking about is &amp; nbsp; (put together - otherwise your comments render it as a space - as it should!) <img src='http://www.jamesv.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>TJ</p>]]></content:encoded>
	</item>
	<item>
		<title>By: TJ Maciak</title>
		<link>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-8397</link>
		<author>TJ Maciak</author>
		<pubDate>Mon, 29 Sep 2008 21:13:00 +0000</pubDate>
		<guid>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-8397</guid>
		<description>&lt;p&gt;Hey this is really cool and works pretty good.  I was having major problems/headaches with IE returning upper case tags and one-name attributes like id=oneName instead of being like id="oneName" when I was using .innerHTML to obtain the contents of a div so that I could send it on to iText using xhtml to make a PDF.  The one problem I have encountered is that your code does something strange with the &#160; tag when using it in IE (6 &#38; 7).  I ended up solving this strangeness by doing a pre-parse on the code that I send to your parseNode function and that fixed the problem using this syntax:    document.getElementById(divID).innerHTML = document.getElementById(divID).innerHTML.replaceAll("&#160;",' ');   &lt;/p&gt;

&lt;p&gt;If I didn't do the preparse then the xhtml reader would tell me that the string I was sending to it (the text returning from parseNode) was invalid with the following output: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.&lt;/p&gt;

&lt;p&gt;Other than that this will help a lot of people out who have to deal with IE (thankfully Firefox handles the innerHTML beautifully sending xhtml compliant lower case tags)!  If you have further questions about the problem I ran into feel free to contact me via email and I will be happy to help test it out more.  Thanks again for offering this up as it is a time &#38; headache saver.&lt;/p&gt;

&lt;p&gt;TJ&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey this is really cool and works pretty good.  I was having major problems/headaches with IE returning upper case tags and one-name attributes like id=oneName instead of being like id=&#8221;oneName&#8221; when I was using .innerHTML to obtain the contents of a div so that I could send it on to iText using xhtml to make a PDF.  The one problem I have encountered is that your code does something strange with the &nbsp; tag when using it in IE (6 &amp; 7).  I ended up solving this strangeness by doing a pre-parse on the code that I send to your parseNode function and that fixed the problem using this syntax:    document.getElementById(divID).innerHTML = document.getElementById(divID).innerHTML.replaceAll(&#8221;&nbsp;&#8221;,&#8217; &#8216;);   </p>

<p>If I didn&#8217;t do the preparse then the xhtml reader would tell me that the string I was sending to it (the text returning from parseNode) was invalid with the following output: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.</p>

<p>Other than that this will help a lot of people out who have to deal with IE (thankfully Firefox handles the innerHTML beautifully sending xhtml compliant lower case tags)!  If you have further questions about the problem I ran into feel free to contact me via email and I will be happy to help test it out more.  Thanks again for offering this up as it is a time &amp; headache saver.</p>

<p>TJ</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Stern</title>
		<link>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-8261</link>
		<author>Eric Stern</author>
		<pubDate>Thu, 18 Sep 2008 23:36:21 +0000</pubDate>
		<guid>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-8261</guid>
		<description>&lt;p&gt;Hi James,
I just stumbled across this after some serious headaches caused by this problem with innerHTML and needed to give you a huge thanks as this immediately fixed the issue!  I've been using jQuery with AJAX to build out a form on the fly and then save it to the server and the innerHTML (which jQuery.html() uses) was getting messed up along the way.  I filed a bug report over there and pointed them towards this post for a fix :)
Thanks again for posting up this solution!
Eric&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi James,
I just stumbled across this after some serious headaches caused by this problem with innerHTML and needed to give you a huge thanks as this immediately fixed the issue!  I&#8217;ve been using jQuery with AJAX to build out a form on the fly and then save it to the server and the innerHTML (which jQuery.html() uses) was getting messed up along the way.  I filed a bug report over there and pointed them towards this post for a fix <img src='http://www.jamesv.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Thanks again for posting up this solution!
Eric</p>]]></content:encoded>
	</item>
	<item>
		<title>By: jamesv</title>
		<link>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-4405</link>
		<author>jamesv</author>
		<pubDate>Sat, 02 Feb 2008 19:20:44 +0000</pubDate>
		<guid>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-4405</guid>
		<description>&lt;p&gt;Sure, grab the latest version - &lt;a href="/code/dom_to_xhtml_parser/download/dom-xhtml-parser_0_2.zip" rel="nofollow"&gt;DOM -&gt; XHTML string parser - v0.2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and call it like:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;    parseNode(target_node, true); // The second param is for an "omit_outer_node" flag&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Should work how you need it now. Shoot me a link once you get your project up and running.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sure, grab the latest version - <a href="/code/dom_to_xhtml_parser/download/dom-xhtml-parser_0_2.zip" rel="nofollow">DOM -> XHTML string parser - v0.2</a></p>

<p>and call it like:</p>

<p><pre>    parseNode(target_node, true); // The second param is for an "omit_outer_node" flag</pre></p>

<p>Should work how you need it now. Shoot me a link once you get your project up and running.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-4390</link>
		<author>Bob</author>
		<pubDate>Fri, 01 Feb 2008 21:42:02 +0000</pubDate>
		<guid>http://www.jamesv.org/2007/06/01/like-innerhtml-except-not-as-broken/#comment-4390</guid>
		<description>&lt;p&gt;Thanks for this!  Been looking for something like this for a while.....however.  Is there any way to remove the surrounding div tags, like innerHTML would do?  I'm looking for innerHTML "content" but with proper HTML tags (lower case and self closing /).&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for this!  Been looking for something like this for a while&#8230;..however.  Is there any way to remove the surrounding div tags, like innerHTML would do?  I&#8217;m looking for innerHTML &#8220;content&#8221; but with proper HTML tags (lower case and self closing /).</p>

<p>Thanks!</p>]]></content:encoded>
	</item>
</channel>
</rss>
