xslt format method

M

Mate Visky

Hi,

how can i format output method (<xsl:blush:utput method=html doescnt working)

here is my code what i use:
xd = new XmlDocument();

xd.Load(this.textBox1.Text);

this.richTextBox1.Text = xd.InnerXml;



// Modify the XML file.

XmlElement root = xd.DocumentElement;

// root.FirstChild.LastChild.InnerText = "12.95";

// Create an XPathNavigator to use for the transform.

XPathNavigator nav = root.CreateNavigator();



xt = new XslTransform();

xt.Load(this.textBox2.Text);

XmlTextWriter writer = new XmlTextWriter("./_books.html",
System.Text.UTF8Encoding.UTF8);

XsltArgumentList xa = new XsltArgumentList();

// xa.a

xt.Transform(nav, null, writer);

writer.Close();
 
J

Jan Zieschang

Hello Mate,

you need to set the Formatting-Property of the XmlTextWriter.
XmlTextWriter writer = new XmlTextWriter("./_books.html",
System.Text.UTF8Encoding.UTF8);
writer.Formatting = Formatting.Indented

greetings, Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top