Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding XSL stylesheet decaration to XML page 1

Status
Not open for further replies.

mcowen

Programmer
Oct 21, 2001
134
GB
Hi,

I cant seem to find a way in the XMLDocument object or anything else to add the xsl-stylesheet tag to an XML document. .NET seems to want to transform the XML itself using XMLtransform but I dont want this. I want to be able to create XML documents in a directory and allow the users to open the XML in their browsers (its internal so I know they are using browsers that can view XML) whereby the browsers transform the XSL and XML.

Does anyone know if this is possible?
TIA

Matt
 
Thats great thanks. Just in case that page gets moved...
Code:
// Add processor information to the XML file
    String strPI = "type='text/xsl' href='Transform.xsl'";
    // Write processor information
    xmlWriter.WriteProcessingInstruction("xml-stylesheet", strPI);

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top