<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: browser bug</title>
	<link>http://blog.lemongarden.co.uk/2006/08/17/browser-bug/</link>
	<description>No lemons and no garden</description>
	<pubDate>Thu, 04 Dec 2008 18:56:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>

	<item>
		<title>by: Richard</title>
		<link>http://blog.lemongarden.co.uk/2006/08/17/browser-bug/#comment-11276</link>
		<pubDate>Tue, 24 Oct 2006 14:06:51 +0000</pubDate>
		<guid>http://blog.lemongarden.co.uk/2006/08/17/browser-bug/#comment-11276</guid>
					<description>Ah, I see what you mean. I always assumed that the xml declaration was itself a processing instruction, as the syntax is so similar. 

I found that when I was creating xml documents in javascript, using:

document.implementation.createDocument() or, in IE, the Microsoft.XMLDOM activeX object

The documents didn't include an xml declaration. The only way I found to add the correct xml declaration was by using "document.createProcessingInstruction()". Do you know of another way to ensure that xml documents contain the correct xml declaration?</description>
		<content:encoded><![CDATA[<p>Ah, I see what you mean. I always assumed that the xml declaration was itself a processing instruction, as the syntax is so similar. </p>
<p>I found that when I was creating xml documents in javascript, using:</p>
<p>document.implementation.createDocument() or, in IE, the Microsoft.XMLDOM activeX object</p>
<p>The documents didn&#8217;t include an xml declaration. The only way I found to add the correct xml declaration was by using &#8220;document.createProcessingInstruction()&#8221;. Do you know of another way to ensure that xml documents contain the correct xml declaration?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: White Lynx</title>
		<link>http://blog.lemongarden.co.uk/2006/08/17/browser-bug/#comment-11130</link>
		<pubDate>Wed, 18 Oct 2006 14:37:25 +0000</pubDate>
		<guid>http://blog.lemongarden.co.uk/2006/08/17/browser-bug/#comment-11130</guid>
					<description>Note that XML declaration is not a processing instruction (also syntax is similar, that makes existing terminology a little bit confusing), and is not treated as such (there are readonly attributes document.xmlEncoding, document.xmlVersion and document.xmlStandalone that can be used to retreive necessary info however), therefore
[code]document.insertBefore(document.createProcessingInstruction("xml","version='1.0' encoding='utf-8'"), document.firstChild);[/code]
will be processed as unknown PI, nor XML decraration.</description>
		<content:encoded><![CDATA[<p>Note that XML declaration is not a processing instruction (also syntax is similar, that makes existing terminology a little bit confusing), and is not treated as such (there are readonly attributes document.xmlEncoding, document.xmlVersion and document.xmlStandalone that can be used to retreive necessary info however), therefore<br />
[code]document.insertBefore(document.createProcessingInstruction(&#8221;xml&#8221;,&#8221;version=&#8217;1.0&#8242; encoding=&#8217;utf-8&#8242;&#8221;), document.firstChild);[/code]<br />
will be processed as unknown PI, nor XML decraration.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
