Click here to Skip to main content
16,016,744 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello All,

Code:
C#
XmlDocument oDoc = new XmlDocument();
XslTransform oTransfer = new XslTransform();

oDoc.LoadXml(txtXMLFileName.Text);

MemoryStream ms = new MemoryStream();
XmlTextWriter output = new XmlTextWriter(ms, Encoding.UTF8);

oTransfer.Load(txtXSLFileName.Text);
oTransfer.Transform(oDoc, null, output);
output.Flush();
ms.Position = 0;
StreamReader sr = new StreamReader(ms);

txtOutput.Text = sr.ReadToEnd();


Error:
Data at the root level is invalid. Line 1, position 1.
Posted
Updated 4-Oct-12 22:13pm
v2

1 solution

Friend will you please share your xml file dummy??

Thanks,
Ambesha
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900