|
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.XPath;
using System.IO;
namespace SQLDocGenerator
{
class HTMLTransfomer
{
private string _xmlfile = string.Empty;
private string _xslFile = string.Empty;
private string _htmlFile = string.Empty;
public HTMLTransfomer(string xmlfile, string xslFile, string htmlFile)
{
_xmlfile = xmlfile;
_xslFile = xslFile;
_htmlFile = htmlFile;
}
public void TableTransformer()
{
XmlTextReader xmlSource = new XmlTextReader(@"xml\" + _xmlfile);
XPathDocument xpathDoc = new XPathDocument(xmlSource);
XmlTextReader xslSource = new XmlTextReader(@"xsl\" + _xslFile);
XslCompiledTransform xsltDoc = new XslCompiledTransform();
xsltDoc.Load(xslSource);
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
XsltArgumentList ar = new XsltArgumentList();
xsltDoc.Transform(xpathDoc, null, sw);
File.WriteAllText(@"html\" + _htmlFile, sb.ToString());
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
An engineer with approx. 8 years of excellent experience in middle tier applications, analysis, design, development, testing, and maintenance of various client server/web based applications. Has the ability to handle multiple task(s), work independently as well as in team. Motivated, energetic with demonstrated proficiency for learning new technologies and business environments to provide effective and efficient IT solution(s) that envisage a futuristic approach with distributed and object oriented technologies.