You have to create a xslt file to transform the xml file, remove the XPath property and add TransformFile="~/Stocks.xslt" in the GridView control. The Stocks.xslt file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<Stocks>
<xsl:apply-templates select ="Stocks"/>
</Stocks>
</xsl:template>
<xsl:template match ="Stocks">
<Stocks>
<xsl:attribute name="name">
<xsl:value-of select="name"/>
</xsl:attribute>
<xsl:attribute name="price">
<xsl:value-of select="price"/>
</xsl:attribute>
</Stocks>
</xsl:template>
</xsl:stylesheet>