LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XML report generation with Stylesheet

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?

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 1 of 8
(4,258 Views)

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

Message 2 of 8
(4,255 Views)
I tried the same before, but when I opened the file in internet explorer, it would show only the script rather than the report. I used Tesstand stylesheet, just for trial. I can see the link referring to that stylesheet in the browser.
-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 3 of 8
(4,243 Views)

Hi Parag D,

can you upload an example report and your stylesheet. For me it works like i said.

 

Mike

0 Kudos
Message 4 of 8
(4,241 Views)

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

Message Edited by Parag D on 08-25-2009 03:58 PM
-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 5 of 8
(4,232 Views)

Hi Parag D,

where is your report? It should be a xml file.

 

Mike

0 Kudos
Message 6 of 8
(4,224 Views)

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)

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 7 of 8
(4,217 Views)

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

0 Kudos
Message 8 of 8
(4,213 Views)