Check out Html Tidy for .NET/Mono
From the project page:
TidyManaged
This is a managed .NET/Mono wrapper for the open source, cross-platform Tidy library, a HTML/XHTML/XML markup parser & cleaner originally created by Dave Raggett.
And sample usage:
using System;
using TidyManaged;
public class Test
{
public static void Main(string[] args)
{
using (Document doc = Document.FromString("<hTml><title>test</tootle><body>asd</body>"))
{
doc.ShowWarnings = false;
doc.Quiet = true;
doc.OutputXhtml = true;
doc.CleanAndRepair();
string parsed = doc.Save();
Console.WriteLine(parsed);
}
}
}
Looks like it should meet your needs perfectly.
Answer from Paul Sasik on Stack OverflowIf you happen to use Notepad++, there is a very powerfull plug-in for that, TextFX.
TextFX can tidy a HTML, but can also do so much more than that.
TextFX includes numerous features to transform selected text. Featuring: * Interactive Brace Matching * Quote handling * Character case alternation * Text rewrap * Column Lineup * Fill Text Down * Insert counter text down * Text to code conversion * Numeric Conversion * URI & HTML encoding * HTML to text conversion * Submit text to W3C * Text sorting * Ascii Chart * Leading whitespace repair * Autoclose HTML & braces
How to get it?
In your Notepad++ do this:
- Plugins -> Plugin Manager -> Show Plugin Manager
- Enable the checkbox next to TextFX Character
- Press the install button
It's as easy as that.
My favourites would be:
- PsPad (http://www.pspad.com/)
- TextPad (http://www.textpad.com/)
Specifically for rendering the results of HTML coding, not the code itself.
I wish to create a small HTML based "program" and I was hoping to use such a software as a sort of "engine" for it to both view and interact with it.
UPDATE: My brother suggested I find a compiler, which led me to visual studio. I appreciate everyone's help but I've decided to just write my own software in C Sharp