<?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/"
	>

<channel>
	<title>Inspired? No &#187; XML</title>
	<atom:link href="http://blog.inspired.no/category/xml/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.inspired.no</link>
	<description>Espen Antonsen writes about the web</description>
	<lastBuildDate>Tue, 13 Jul 2010 11:31:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MSXML6: does not allow script in XSL stylesheets</title>
		<link>http://blog.inspired.no/msxml6-does-not-allow-script-in-xsl-stylesheets-227</link>
		<comments>http://blog.inspired.no/msxml6-does-not-allow-script-in-xsl-stylesheets-227#comments</comments>
		<pubDate>Thu, 18 Jan 2007 15:34:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/msxml6-does-not-allow-script-in-xsl-stylesheets-227</guid>
		<description><![CDATA[A security change is introduced in MSXML parser version 6.0: When loading a XSLT document that contains a script you must enable the AllowXsltScript property. See this forum post for more info. This will enable the use of msxml:script element functionality. The default value is changed to false in version 6.0. We use XSLT in [...]]]></description>
			<content:encoded><![CDATA[<p>A security change is introduced in MSXML parser version 6.0:</p>
<p>When loading a XSLT document that contains a script you must enable the <a href="http://msdn2.microsoft.com/en-us/library/ms754621.aspx">AllowXsltScript</a> property. See <a href="http://www.topxml.com/BizTalk/rn-185098_MSXML6-does-not-allow-script-in-XSL-stylesheets.aspx">this forum post</a> for more info. This will enable the use of <span style="font-style:italic;">msxml:script</span> element functionality. The default value is changed to false in version 6.0. We use XSLT in our report generator to easily generate reports in any format (HTML, XML, Excel, CSV and custom formats). <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/ba3e4d4f-1ee7-4226-a51a-78a1f1b5bd8a.asp">Read more on XSLT Security</a>.</p>
<p>Technorati: <a rel="tag" href="http://technorati.com/tag/MSXML">MSXML</a>, <a rel="tag" href="http://technorati.com/tag/XML">XML</a>, <a rel="tag" href="http://technorati.com/tag/XSLT">XSLT</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/msxml6-does-not-allow-script-in-xsl-stylesheets-227/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SelectNodes in Mozilla</title>
		<link>http://blog.inspired.no/selectnodes-in-mozilla-215</link>
		<comments>http://blog.inspired.no/selectnodes-in-mozilla-215#comments</comments>
		<pubDate>Tue, 14 Nov 2006 14:07:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XPath]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/selectnodes-in-mozilla-215</guid>
		<description><![CDATA[The XML-DOM in IE includes selectNodes and selectSingleNode which is much easier to use than the equivalent x-path functions in Mozilla. To create a cross-browser solution that is based on the IE-syntax check out Simple Implementation of selectNodes() and selectSingleNode() for FireFox [Mozilla] with a script which works very good.Technorati: XML, XPath]]></description>
			<content:encoded><![CDATA[<p>The XML-DOM in IE includes selectNodes and selectSingleNode which is much easier to use than the equivalent x-path functions in Mozilla. To create a cross-browser solution that is based on the IE-syntax check out <a href="http://km0.la/js/mozXPath/">Simple Implementation of selectNodes() and selectSingleNode() for FireFox [Mozilla]</a> with a <a href="http://km0.la/js/mozXPath/mozxpath.js">script</a> which works very good.<br/><br/>Technorati: <a href="http://technorati.com/tag/XML" rel="tag">XML</a>, <a href="http://technorati.com/tag/XPath" rel="tag">XPath</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/selectnodes-in-mozilla-215/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VBScript in XSLT</title>
		<link>http://blog.inspired.no/vbscript-in-xslt-127</link>
		<comments>http://blog.inspired.no/vbscript-in-xslt-127#comments</comments>
		<pubDate>Thu, 14 Apr 2005 15:37:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/vbscript-in-xslt-127</guid>
		<description><![CDATA[Did you know you can use VBScript in XSLT files? Sample script which goes after the xslt namespace: &#60;msxml:script language="VBScript" implements-prefix="VBCustomScript"&#62; &#60;![CDATA[ function VBCustomScript(str) VBCustomScript= "test" &#038; str end function ]]&#62; &#60;/msxml:script&#62; add to xslt namespace: &#60;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:VBCustomScript="#VBCustomScript" &#62; in xslt: &#60;xsl:value-of select=""VBCustomScript:VBCustomScript(string(@Field))""/&#62;]]></description>
			<content:encoded><![CDATA[<p>Did you know you can use VBScript in XSLT files?</p>
<p>Sample script which goes after the xslt namespace:</p>
<pre name="code" class="xml">
&lt;msxml:script language="VBScript" implements-prefix="VBCustomScript"&gt;
&lt;![CDATA[
function VBCustomScript(str)
VBCustomScript= "test" &#038; str
 end function
]]&gt;
&lt;/msxml:script&gt;</pre>
<p>add to xslt namespace:</p>
<pre name="code" class="xml">
&lt;xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:VBCustomScript="#VBCustomScript"
&gt;</pre>
<p>in xslt:</p>
<pre name="code" class="xml">
&lt;xsl:value-of select=""VBCustomScript:VBCustomScript(string(@Field))""/&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/vbscript-in-xslt-127/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cross-browser XML sniffer &#8211; outline</title>
		<link>http://blog.inspired.no/cross-browser-xml-sniffer-outline-98</link>
		<comments>http://blog.inspired.no/cross-browser-xml-sniffer-outline-98#comments</comments>
		<pubDate>Sat, 18 Dec 2004 17:01:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[XMLHttpRequest]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/cross-browser-xml-sniffer-outline-98</guid>
		<description><![CDATA[I wrote earlier about my Microsoft XML Parser sniffer. My previous post included a link about using DOM Document in Mozilla/Opera, and it got me thinking. I am going to write a cross-browser XML sniffer with functions to initialise both the DOM Document and XMLHTTPRequest objects in all browsers. I don&#8217;t think any other of [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote earlier about my <a href="/2004/10/microsoft-xml-parser-sniffer-update.html">Microsoft XML Parser sniffer</a>. My previous post included a link about using DOM Document in Mozilla/Opera, and it got me thinking. I am going to write a cross-browser XML sniffer with functions to initialise both the DOM Document and XMLHTTPRequest objects in all browsers. I don&#8217;t think any other of the XML objects in the Microsoft XML Parser have W3C alternatives which Mozilla/Opera can utilize.</p>
<p>The changes from the current XML sniffer will be:</p>
<p>- Check if IE or Mozilla/Opera.</p>
<p>- Array with all Microsoft XML Parser versions. Loop through and find newest version installed. Better than the current try/catch of all versions which is currently used.</p>
<p>- Include W3C standard of XMLHTTPRequest and DOMDocument together with all the current included objects from Microsoft XML Parser.</p>
<p>Anyone got some thoughts regarding this?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/cross-browser-xml-sniffer-outline-98/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to loop through a XML document using the XML Parser (DOM Document)</title>
		<link>http://blog.inspired.no/how-to-loop-through-a-xml-document-using-the-xml-parser-dom-document-85</link>
		<comments>http://blog.inspired.no/how-to-loop-through-a-xml-document-using-the-xml-parser-dom-document-85#comments</comments>
		<pubDate>Sat, 06 Nov 2004 18:21:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[XMLHttpRequest]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/how-to-loop-through-a-xml-document-using-the-xml-parser-dom-document-85</guid>
		<description><![CDATA[XML/DOM/Parser 101: This post will explain how to load a XML document and then loop through all elements and display the value. It will give you a brief introduction in how to use the DOMCDocument object in Microsoft XML Parser and how the DOM works. XML looks like this: &#60;?xml version="1.0" encoding="UTF-8"?&#62; &#60;Users&#62; &#60;User&#62;Espen&#60;/User&#62; &#60;User&#62;Bill&#60;/User&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>XML/DOM/Parser 101:</p>
<p>This post will explain how to load a XML document and then loop through all elements and display the value. It will give you a brief introduction in how to use the DOMCDocument object in Microsoft XML Parser and how the DOM works.</p>
<p>XML looks like this:</p>
<pre name="code" class="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Users&gt;
	&lt;User&gt;Espen&lt;/User&gt;
	&lt;User&gt;Bill&lt;/User&gt;
	&lt;User&gt;Steve&lt;/User&gt;
&lt;/Users&gt;</pre>
<p> </p>
<p>I have used a simple XML with one root element and three child nodes, each with their own node text. The DOM represent the XML like this:</p>
<p><em>Users (documentElement)</p>
<p>User (childNode 0) &#8211; Espen (childNode 0 nodeText)</p>
<p>User (childNode 1) &#8211; Bill (childNode 0 nodeText)</p>
<p>User (childNode 2) &#8211; Steve (childNode 0 nodeText)<br />
</em></p>
<p> </p>
<p>The is made up of node elements like shown above. These elements can have child and/or parent elements, attributes and a node text. We can use the DOM in JavaScript to retrieve and manipulate these elements. See the DOM specification for more information.</p>
<p>Below is the javascript code. <a href="/2004/10/microsoft-xml-parser-sniffer-update.html">It requires this XML Parser sniffer!</a></p>
<p> </p>
<pre name="code" class="javascript">&lt;script type="text/javascript" src="msxml_sniffer.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;
// requires XML Parser sniffer
var formValues_DOM = NewXMLParser('DOMDocument');
var formValues;

function getData() {
	var url;
	url = 'users.xml';
	if(typeof FormValues_DOM != 'object') {
		if(formValues_DOM &gt; '') {
			formValues_DOM = new ActiveXObject(formValues_DOM)
		} else {
			alert('XML Parser not installed');
		}
	}
	formValues_DOM.async = false;
	formValues_DOM.load(url);
	if(formValues_DOM.parseError == 0) {
		formValues = formValues_DOM.documentElement;
	insertValues();
	}
	else {
		alert('XML not loaded');
	}
}

function insertValues() {
	var nodeValue;
	for(var i=0;i &lt; formValues.childNodes.length;i++) {
		nodeValue= formValues.childNodes[i].text;
		// do something with the value here:
		alert(nodeValue);
	}
}
&lt;/script&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/how-to-loop-through-a-xml-document-using-the-xml-parser-dom-document-85/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Line breaks in XSLT</title>
		<link>http://blog.inspired.no/line-breaks-in-xslt-55</link>
		<comments>http://blog.inspired.no/line-breaks-in-xslt-55#comments</comments>
		<pubDate>Tue, 10 Aug 2004 09:31:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/line-breaks-in-xslt-55</guid>
		<description><![CDATA[Line break in XSLT&#8230;sounds simple. When I created a XSLT for generating Microsoft Excel files I couldn&#8217;t understand why I couldn&#8217;t get line breaks. I tried inserting vbCrLf in the XSLT (using ASP) and inserting with XSLT (#13;). Nothing worked. I posted a question on Expert Exchange and got an answer from someone who had [...]]]></description>
			<content:encoded><![CDATA[<p>Line break in XSLT&#8230;sounds simple. When I created a XSLT for generating Microsoft Excel files I couldn&#8217;t understand why I couldn&#8217;t get line breaks. I tried inserting vbCrLf in the XSLT (using ASP) and inserting with XSLT (#13;). Nothing worked.</p>
<p>I posted a question on Expert Exchange and got an answer from someone who had used indent=&#8221;yes&#8221; in XSLT output when using method=&#8221;xml&#8221;. That worked fine when used with my Excelt XSLT file.</p>
<p>But when I was going to make a CSV export using XSLT, the same formula didn&#8217;t work. After some googling and testing I found this solution: Use method=&#8221;text&#8221; and indent=&#8221;yes&#8221; in xsl:output. Use xsl text and put a line break (#x0D;) and use xml:space=&#8221;preserve&#8221;.</p>
<p>Note the key here is xml:space=&#8221;preserve&#8221;. Without it won&#8217;t work. It only worked if I added some text before the line break. But obviously, in a CSV, I don&#8217;t wont test at the end of the line.</p>
<p>Arghh..How can i post html/xml code in my blog? I have used the CODE tag earlier when posting ASP and Javascript code. But doesn&#8217;t work with XML, it doesn&#8217;t show up in the post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/line-breaks-in-xslt-55/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Exporting SQL Data as XML</title>
		<link>http://blog.inspired.no/exporting-sql-data-as-xml-15</link>
		<comments>http://blog.inspired.no/exporting-sql-data-as-xml-15#comments</comments>
		<pubDate>Tue, 11 May 2004 18:21:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[ADO]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/exporting-sql-data-as-xml-15</guid>
		<description><![CDATA[I have been working a lot with XML lately, for a report generator i have created. The report is generated in XML from Microsoft SQL Server 2000 and transformed to HTML/XML (or any other format) using XSLT. Also, the user interface is heavily build on XML. All tables and fields that the user can choose [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working a lot with XML lately, for a report generator i have created. The report is generated in XML from Microsoft SQL Server 2000 and transformed to HTML/XML (or any other format) using XSLT. Also, the user interface is heavily build on XML. All tables and fields that the user can choose from are added from a XML file. All that is done by using JavaScript and the Microsoft XML Parser. The drawback is that it&#8217;s slow because i have to load up 6 XML files, so i might go for another solution there. When generating the report though it is all server based, so performance is not a problem (yet..). It&#8217;s great to use XSLT and with all the control and possibilities with it. To use plain HTML and ASP to make custom reports would be a pain when it would require updates. Have a look at the link provided in this post to learn how to export data from SQL Server to XML. I have used ADO and save the recordset to a MS XML Parser DOM Document, which is then transformed using a XSLT stylesheet which is dynamically generated using ASP.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/exporting-sql-data-as-xml-15/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
