views:

9

answers:

0

I have the following xml

<?xml version="1.0" ?>
<Persons>
  <Person>
    <Id>1</Id>
    <Name>someone</Name>
  </Person>
  <Person>
    <Id>2</Id>
    <Name>someone2</Name>
  </Person>
</Persons>

and the following xsl file for it

<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 ="/">
    <Persons>
            <xsl:apply-templates select ="//Person"/>
  </Persons>
</xsl:template>
<xsl:template match ="//Person">
    <Person>
        <xsl:attribute name="Id">
            <xsl:value-of select="Id"/>
        </xsl:attribute>
        <xsl:attribute name="Name">
            <xsl:value-of select="Name"/>
        </xsl:attribute>
    </Person>
</xsl:template>
</xsl:stylesheet>

I am using a gridview to view this data, which works fine. but I cannot edit the xml file. When I hit edit after changing a field I get the following error

Exception Details: System.NotSupportedException: Specified method is not supported.