LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parse/print xml file

I have a folder full of existing XML files (test reports). I am programmatically searching and selecting a single file based on naming citeria with no problems.
 
What I can't get working is printing this file. It views properly in a browser (I have the proper XSL in the proper folder) and prints manually from the browser. I need to programmatically send this file to the printer and print with no user intervention.
 
I am currently going down the path of using ActiveX or DOM but can't seem to get it all working within LV (using v.8.5). Is there a better/easier way to print this file? If I were to use the report VIs, I would need to change this XML file into an HTML report (seems cumbersome).
 
Thanks in advance for any guidance and assistance,
Brian
0 Kudos
Message 1 of 3
(2,705 Views)
You could talk directly to the printer and send it the commands directly...Its a pain, and not very "portable" since its brand or printer specific, but I had to do it a long while back with my app...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 2 of 3
(2,692 Views)
You need something to render the XML with an XSL. You can do this yourself, or use a browser. The report VIs are doing the same thing a browser does anyway. Given that, it seems that the report VIs would be less cumbersome than trying to use ActiveX and DOM. Additionally, they would be platform independent.

If you want to go down the ActiveX and DOM route, what part isn't working? Perhaps if you post your code some tips can be provided.
0 Kudos
Message 3 of 3
(2,683 Views)