Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
Welcome to AspAdvice Sign in | Join | Help

string XML and XSL

  •  12-30-2006, 11:11 AM

    string XML and XSL

    Hello,

    Im new to ASP.NET using C# and I wish to apply an XSLT stylesheet to a string of XHTML im currently holding in memory. I wish to do this because it saves the time of looking up the XML file and then reading in the file.

    The current code I have is:
    string output = (@"I:\james.xml");
    string xslPath = (@"I:\james.xsl");

    XslTransform xslt =
    new XslTransform();
    xslt.Load(xslPath);
    xslt.Transform(websiteHTML, output);

    (websiteHTML is just a string of XHTML)

    This cannot be done as websiteHTML is a string in memory and not a file. Could anyone advise me on the code I would need to accomplish this as I cannot find it.

    Many Thanks,
    James.

    Filed under: ,
View Complete Thread