c# StringReader, XmlReader, XSLT - Unexpected XML Declaration -
After
I can read XML from a string and this function has been used to apply an XSLT style sheet; Working very well for a small part of XML:
Private Static String TransformXML (string XML, string XSLT) {string output = String.Empty; (Using XmlReader XRT = XmlReader.Create (SRT)) using (StringReader srt = New StringReader (XSLT)) {{StringReader Mr. = New StringReader (XML)) {XmlReader XRI = XmlReader.Create (Mr.)) {XslCompiledTransform xslt = New XslCompiledTransform (); Xslt.load (XRT); Using StringWriter sw = new StringWriter ()) (XmlWriter xwo = XmlWriter.Create (sw, xslt.OutputSettings)) // Using XSL OutputSettings, then this HTML {xslt.Transform (XRI, xwo) Can be produced as; Output = sw.ToString (); }}} Return output; }
However, with a large part of XML, I am getting errors, even if I know that it is formatted correctly.
Here is an example error: the unexpected end of the file while parsing the name. Line 1, position 30001.
My guess is there is a limit on buffering, but I can not do much of this work - the code is within an SSIS package and produces and translates different script works Xml
I appreciate any help!
Comments
Post a Comment