XML, XSL, etc
XPath statements are case sensitive. To get around this use the following example to convert all data to lower case before performing the equality check: /bookstore/book[translate(@... 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = '" + searchtext.ToLower() + "'] Thanks very much to Harish for this
Serialize (convert an object instance to an XML document): // Assuming obj is an instance of an objectXmlSerializer ser = new XmlSerializer(obj.GetType()... sb = new System.Text.StringBuilder()... writer = new System.IO.StringWriter(sb);... obj);XmlDocument doc = new XmlDocument();doc.LoadXml(s... Deserialize (convert an XML document into an object instance): //Assuming doc is an XML document containing a serialized object and...
Here's an HTML page containing javascript functions for displaying an RSS feed in nicely formatted HTML. Licence Agreement: To use this work, you, the licencee, agree to purchase, me (Tim Huffam) a pint of beer. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HT... HTML RSS Viewer </TITLE><script> var rssDoc = new ActiveXObject("MSXML2.DOMDo... rssDoc.onreadystatechange = popData; function displayRSS(path){ mainTitle.href =...
Thought it was about time there was a xsl template for allowing you to view RSS... so here's a basic one I've knocked up.. feel free to use (note that I've added some jigery-pokery so it caters for encoded embedded html within the rss description element). I'll follow this post with another one showing how to acheive this using javascript (ajax style). To use, just save the following xsl to a file, then add a reference to it in your rss feed with the following line: <?xml-stylesheet type="text/xsl"...