I am trying to use the XML Viewer web part in SharePoint 2010. Using the this XML
<?xml version="1.0" encoding="UTF-8"?> <STOCKQUOTE ROWCOUNT='1'> <RESULT> <ROW> <COMPANYNAME>Test Company Name</COMPANYNAME> </ROW> </RESULT> </STOCKQUOTE>
and this XSL
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <h2><xsl:value-of select="STOCKQUOTE/RESULT/ROW/COMPANYNAME" /></h2> </xsl:template> </xsl:stylesheet>
in the XML editor and XSL editor of the web part options menu, when I click apply I get the error 'Failed to apply XSLT to the content'.
I have used this same XML/XSL in a VM development environment and it displays as expected, but when I try to create the same web part with the same XML/XSL in our test environment I get the said error. I have been working on this for some time and my google-fu isn't apparently working. Any idea what might be the issue or how to solve this? The only difference between the test and VM dev environments is that the test environment is two servers and load balanced. I have been told all other settings are the same.
Thanks in advance
*EDIT: So apparently I missed that there was a DOCTYPE defined for the XML in the test environment. Removing that allows it display. Since the XML will be coming from an outside source I will need to find out how to get around having a doctype defined.