Geeks With Blogs
Shailen Sukul blog November 2006 Entries
CData sections not appearing with XML Transform ( XSLT ) ( applies to XslCompiledTransform class )
I have noticed an anamoly with doing XML Transformations in .Net. If the XSLT marks specific sections as CDATA, the output seems to missing that. Example: XSLT: <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" cdata-section-elements="EMP... EMPFIRST"/> We would expect output to be of the format: <Employee> <EMPLAST><![CDATA[... and so on... </Employee> However, the standard XSLT transformation does not output the ......

Posted On Monday, November 27, 2006 2:38 PM

Helper code to extract embedded resource from project into Assembly
The following is a handy piece of code for extracing an embedded stream of characters from your assembly and saving to a text file. 1. Set the resource to Embedded. 2. Copy the following piece of code: public static void WriteResourceToFile(string resourceName, string fileName) { using (Stream s = Assembly.GetExecutingAssemb... { if (s != null) { byte[] buffer = new byte[s.Length]; char[] sb = new char[s.Length]; s.Read(buffer, 0, (int)(s.Length)); /* convert ......

Posted On Friday, November 24, 2006 1:57 PM

Copyright © Shailen Sukul | Powered by: