I have a large number of html test reports that were created in TestStand that I want to post process (search through for data) using LabVIEW. Currently if I open them I see all the html tags and I want to know if there is an easy way to clean that out and get the raw information...(similar to opening a document in a web browser and doing a "save as text file"). I have the internet toolkit and the "Internet Applications in LabVIEW" text, but couldn't find what I wanted in either place. Anyone ever do this before? My next course of action would be to use ActiveX and try to save it as text through the browser, but that would be very slow (open IE, open file, save as text, close IE, open text file, process, delete text file...repeat thousands of times). Any info would be appreciated.
Ben and Jim gave you some good answers to help you get started. What I'd like to say is that to avoid all of this in the future, you should start saving the results from TestStand in a database. As you have found out, going through a couple thousand html files is time consuming and requires a significant amoutn of disk space. Haing the same test results in a single database is much more efficient and it's a trivial matter for just about anyone to run some simple queries and analyse it the way they want. A simple Access database will do in a lot of situations. If you really don't want to use a database, at least use the XML report generation in TestStand.
Dennis, Thanks for the response. You're preaching to the choir here. Back in '97 or 98 I presented at NI week a system I designed using the old Test Executive Toolkit coupled to a MS SQL Server DB, so I'm well aware of the value in that. In 2000 I started working at my present job and the first 3 years we were running full tilt just trying to get test programs written. It's only now that I'm getting to develop high level tools again. This is just a short term solution I was trying to throw together. Kind of frustrating working with out of date tools, but at least we shipped a lot of product in that time. John
Thanks Jim, I tried the VI on one of my reports, but it didn't work. The reason I think is because there are additional ">" characters that TestStand uses to denote a path to a VI within subsequences. I should be able to make minor modifications to it so that it doesn't see them. You're right, it is efficiently coded though! Thanks again. John
For all those of us who can deal with a slight speed penalty, we can get the same result by just using the built-in "search and Replace Pattern" tool as in the attached image (First seen in Kevin Price's early attempt at the recent HTML coding challenge posted here).