Invalid URI: The Uri scheme is too long
- by phenevo
Hi,
I have XML:
Which is result of this part of query:
SELECT Countries.FileSystemName as country ,Regions.DefaultName as region ,Provinces.DefaultName as province,cities.defaultname as city,cities.code as cityCode, IndividualFlagsWithForObjects.value as Status
I have xslt:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="iso-8859-1"/>
<xsl:param name="delim" select="string(',')" />
<xsl:param name="quote" select="string('"')" />
<xsl:param name="break" select="string('
')" />
<xsl:template match="/">
<xsl:apply-templates select="results/countries" />
</xsl:template>
<xsl:template match="countries">
<xsl:apply-templates />
<xsl:if test="following-sibling::*">
<xsl:value-of select="$break" />
</xsl:if>
</xsl:template>
<xsl:template match="*">
<!-- remove normalize-space() if you want keep white-space at it is -->
<xsl:value-of select="concat($quote, normalize-space(.), $quote)" />
<xsl:if test="following-sibling::*">
<xsl:value-of select="$delim" />
</xsl:if>
</xsl:template>
<xsl:template match="text()" />
</xsl:stylesheet>
And is part of code
XmlReader reader = cmd.ExecuteXmlReader();
doc.LoadXml("<results></results>");
XmlNode newNode = doc.ReadNode(reader);
while (newNode != null)
{
doc.DocumentElement.AppendChild(newNode);
newNode = doc.ReadNode(reader);
}
doc.Save(@"c:\listOfCities.xml");
XslCompiledTransform XSLT = new XslCompiledTransform();
XsltSettings settings = new XsltSettings();
settings.EnableScript = true;
XSLT.Load(@"c:\xsltfile1.xslt", settings, new XmlUrlResolver());
XSLT.Transform(doc.OuterXml,@"c:\myCities.csv"); <-here I get error
Why I get error. Is seems to be good .