Micro Focus QTP (UFT) Forums
HP Run Results Viewer 11 don't substitute the data from an external xml file. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: HP Run Results Viewer 11 don't substitute the data from an external xml file. (/Thread-HP-Run-Results-Viewer-11-don-t-substitute-the-data-from-an-external-xml-file)



HP Run Results Viewer 11 don't substitute the data from an external xml file. - dondemon - 04-16-2012

HP Run Results Viewer 11 don't substitute the data from an external xml file. And just freezes and closes in the output in a template XSL.
In the MS VS 10 debugger XSLT runs correctly and produces the desired text.
When debugging, if an error is hovering RRV
Code:
System.FormatException was unhandled
Message = Input string was not in a correct format.
Source = mscorlib
StackTrace:
in System.Number.StringToNumber (String str, NumberStyles options, NumberBuffer & number, NumberFormatInfo info, Boolean parseDecimal)
in System.Number.ParseInt32 (String s, NumberStyles style, NumberFormatInfo info)
in ReportReader.XmlLoaderBase `1.GetXmlLineFromException (Exception inner)
in ReportReader.XmlLoaderBase `1.LoadXml (String pathToXmlFile)
in ReportReader.ExportReport.ConverterBase.DoConvert ()
in System.Threading.ThreadHelper.ThreadStart_Context (Object state)
at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart ()
InnerException:

In an external xml file is only two lines:
Code:
<? Xml version = "1.0" encoding = "windows-1251"?>
<organization> apraraprp1111 </ organization>


Here are the lines that need to substitute the text between the tags in a <organization> template result
Code:
<! [CDATA [for a customer: "]]>
<xsl:for-each select="document('C:\***\BIN\company.xml')">
<xsl:value-of select="organization"/>
</xsl: for-each>
<! [CDATA ["]]>

In QTP 9 this line is working correctly, and substituted the name of the template.
If you remove "<xsl:for-each..." lines,RRV run correctly, but the necessary text will not be.
I tried to change the encoding in the xml windows-1251 to UTF. It didn't help.