So if I have something like the following:
Code:
-18519.65 -100000 -500 0.0 30.9946 10.0 -18619.65 -97500 -550 0.00 30.9846
-18519.65 -100000 -500 0.0 30.9946 10.0 -18619.65 -97500 -550 0.00 30.9846
<root name="PlanRepository">
XslCompiledTransform myXslTrans = new XslCompiledTransform();
myXslTrans.Load("sortByExtension.xsl");
StringBuilder XmlStringBuilder = new StringBuilder();
XmlWriter myXmlWriter = XmlWriter.Create(XmlStringBuilder);
myXslTrans.Transform(TreeViewXML, null, myXmlWriter);
XmlDocument sortedXML = new
XslCompiledTransform myXslTrans = new XslCompiledTransform();
myXslTrans.Load("sortByExtension.xsl");
XmlTextWriter XmlWrite
System.Xml.Xsl.XslLoadException: XSLT compile error. ---> System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character. Line 11, position 22.
<xsl:template match="root"> &lt;root name="PlanRepository"&gt; <xsl:apply-templates /> &lt;/root&gt; </xsl:template> <xsl:template match="directory"> &lt;directory name="<xsl:value-of select="@name"/>"&gt; <xsl:choose>
<root name="PlanRepository">
<directory name="connoraj">
<directory name="single_run1">
<file>insidebox.txt</file>
<file>outsidebox.txt</file>
<directory name="SAFE_Input">
<file>leapseconds.txt</file>
XslCompiledTransform myXslTrans = new XslCompiledTransform();
myXslTrans.Load("sortByExtension.xsl");
XmlTextWriter myWriter = new XmlTextWriter("result.xml", null);
myXslTrans.Transform(tvXML, null, myWriter);
Leave a comment: