All,
I am getting some "XML" feeds from some old lab equipment, however the XML isn't well formed. Really it isn't even XML it is just a formatted text file. So I will get a feed like the following:
<SampleSet Label="Sample Set"><Name Label="Name" Value="CQS6" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 12:20 PM" /><CarbonAvg Label="Carbon Avg." Value="116 ppm" /></SampleSet><SampleSet Label="Sample Set"><Name Label="Name" Value="2015002301 1" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 11:46 AM" /><CarbonAvg Label="Carbon Avg." Value="43.5 ppm" /></SampleSet><SampleSet Label="Sample Set"><Name Label="Name" Value="2015002302 2" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 11:53 AM" /><CarbonAvg Label="Carbon Avg." Value="44.4 ppm" /></SampleSet><SampleSet Label="Sample Set"><Name Label="Name" Value="2015002303 3" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 12:00 PM" /><CarbonAvg Label="Carbon Avg." Value="42.6 ppm" /></SampleSet><SampleSet Label="Sample Set"><Name Label="Name" Value="2015002322 1" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 12:07 PM" /><CarbonAvg Label="Carbon Avg." Value="32.3 ppm" /></SampleSet><SampleSet Label="Sample Set"><Name Label="Name" Value="2015002323 2" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 12:14 PM" /><CarbonAvg Label="Carbon Avg." Value="35.8 ppm" /></SampleSet><SampleSet Label="Sample Set"><Name Label="Name" Value="2015002324 3" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 12:27 PM" /><CarbonAvg Label="Carbon Avg." Value="32.4 ppm" /></SampleSet><SampleSet Label="Sample Set"><Name Label="Name" Value="CQS6" /><AnalysisDate Label="Analysis Date" Value="3/13/2015 12:33 PM" /><CarbonAvg Label="Carbon Avg." Value="123 ppm" /></SampleSet>
As you can see, this isn't well formed and when I try to process this via XSLT I run into all kinds of problems. So outside of writting a program to watch for files, picking them up with a c# program, wrapping the XML to make it well formed then pass it to the XSLT file, is there a way that I can wrap the file using XSLT instead of having to create a separate program to make it well formed? Any help is appreciated.