Browse by Tags

Obtaining Indented XML as a String
Published 22 June 4 12:55 AM | coad
Using XmlDocument.Save(string file) produces a file with nicely indented elements. XmlDocument.OuterXml returns a string without any formatting. If you want a nicely formatted string (to display to the user, write to console, etc), without directly writing...
Filed under: ,
Well Formatted Blog, Can't Directly Copy from MS Word
Published 14 April 4 11:6 PM | coad
Wow! Well I just had to go back through all my posts and repost them all. It seams that one can not directly copy and paste from a Microsoft Word document to achieve a nicely formatted blog. Invalid XML code is the end result causing the RSS feed to break...
Filed under: , ,
Assimilate XML RSS Feed from URL in C#
Published 14 April 4 9:46 PM | coad
This piece of code pulls an RSS feed and displays the title of the articles. It is here to demonstrate just how easy it is to pull XML off the web and utilize the data. I use Trace.WriteLine instead of Console.WriteLine so the report is fed to the Visual...
Filed under: ,
JScript XML Data Access
Published 13 April 4 11:10 PM | coad
“Random Vocabulary Word.js” This simple JScript demonstrates just how easy it is to access data from an XML file through the Windows Scripting Host and MSHTML 4.0. You must have “Vocabulary.xml” in the same directory when running. // Created by Noah Coad...
Filed under: ,
Simple C# XSL Transformation
Published 13 April 4 11:6 PM | coad
“XSLTransform.cs” And here is a simple C# translator that takes an XML file sends it through an XSL file transform and saves the output. It is intended to be used as a console application. This can be easily used to apply the CSV transform XSL to Vocabulary...
Filed under: ,
XSL Transform XML to CSV
Published 13 April 4 11:0 PM | coad
“VocabularyToCSV.xsl” Since Comma Separated Value (CSV) files are so common, here is a transformation. It requires “ Vocabulary.xml ” and a translator. <? xml version ="1.0"?> <! -- Created by Noah Coad, coad.net/noah, noah@coad.net, 3/23/04...
Filed under:
HTML With XML Data Binding
Published 13 April 4 10:40 PM | coad
“Vocabulary.html” This is used in conjunction with “ Vocabulary.xml ” to demonstrate IE HTML data binding. Without any scripting, this will pull data from the XML file and display it in the HTML page. This is considerably different than the XSLT that...
Filed under:
XSL Translation from XML to HTML
Published 13 April 4 10:34 PM | coad
“Vocabulary.xsl” This is used in conjunction with “ Vocabulary.xml ” to demonstrate the power of XSL translation. Put both in the same directory, load the .xml file in IE, and IE will automatically apply the transformation into HTML. Key points: Translation...
Filed under:
Sample XML Data, Vocabulary.xml
Published 13 April 4 9:57 PM | coad
“Vocabulary.xml” This is my first code posting so bear with as they get better. This is a sample XML file that will be used for a number of the other postings. <? xml version ="1.0" standalone ="yes"?> <? xml-stylesheet type= "text/xsl" href...
Filed under: