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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing text from xml

Status
Not open for further replies.

MilesN

Programmer
Feb 18, 2002
1
GB
I need to print out a hard copy of the contents of an xml doc, at the moment I'm attempting to create an external text file with the data and then referencing the file inside an inline frame and then using the JScript function print() to print the contents of the inline frame - all within an xsl stylesheet. Unfortunately this is not working, I have tried using the SAXON processor to use the element saxon:eek:utput to create the text file, but no joy.

Has anyone else tried to print and/or create external files from an xsl stylesheet - I can't believe I am the only one! How did you do it?

Cheers,
MilesN.
 
Hi MilesN

I'm not sure I completely understand what you are trying to do.

But I answered a similar request to produce HTML from XML and XSL the other day see thread426-211231.

The code below outputs HTML to a file using the XSL file to transform it
Code:
'Transform the file and output to file
objTextStream.WriteLine objxmlDOM.transformNode(objxslDOM)

I assume you are creating/loading your XML using code otherwise you would just print the XML document.

So if you are using Microsoft.XMLDOM you can output the XML itself without XSL to a file using

Code:
'output XML to file
objTextStream.WriteLine objxmlDOM.xml

or to a web page using

Code:
Response.Write &quot;<xmp>&quot; & objxmlDOM.xml & &quot;</xmp>&quot;


Hope this helps.

Regards,

MonsterMilo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top