08-25-2009 01:55 AM
Hi all,
I am creating a LabVIEW code which would be generating a XML report. Is there any way we can import this report into a xml stylesheet programatically using LabVIEW and open the report automatically after the code has been generated?
08-25-2009 02:01 AM
Hi Parag D,
you don't need to import the report into a stylesheet, you only have to insert a link to your stylesheet into the report.
it should be something like this:
<?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet type="text/xsl" href="./yourstylesheetname.xsl"?>
You can open your report with a browser. You can use the "Open URL in Default Browser" function for it.
Mike
08-25-2009 04:51 AM
08-25-2009 04:52 AM
Hi Parag D,
can you upload an example report and your stylesheet. For me it works like i said.
Mike
08-25-2009 05:25 AM - edited 08-25-2009 05:28 AM
Hi Mike,
Here are stylesheets taken from teststand. I tried using one of them by a simple VI having some String controls like Name, Age, Address etc. and logging it to an xml file using this stylesheet. Is there any format or something I am missing?
If you have any sample VI for me, it would be of great help if you attach it.
I am using LV 8.2
08-25-2009 05:41 AM
Hi Parag D,
where is your report? It should be a xml file.
Mike
08-25-2009 06:28 AM
Hi Mike,
I am generating xml report through JKI Easy XML toolkit (Write XML VI) which would be saving any data input to it in .xml format.
My question is how would I import this generated report into a stylesheet, programtically?
(I wired the stylesheet input of JKI Write XML VI with one teststand stylesheet but it didnt work out as expected)
08-25-2009 06:35 AM
Hi Parag D,
i only insert the link to the stylesheet into the xml file. I do this at the beginning of the xml file. If you then load the xml file, it should also use the stylesheet to present your data.
Mike