W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2005

html tidy SaveString method

From: Daniel Bar <daniel.bar@gmail.com>
Date: Sat, 17 Sep 2005 14:05:18 +0200
Message-ID: <b1a00435050917050546635996@mail.gmail.com>
To: html-tidy@w3.org
 i have done the following steps :
 1.download the TidyAtl.dll
2.regsvr32 /c tidyAtl.dll
3.TlbImp c:\TidyATL.dll /out:c:\Tidy.dll
 i got a dll that i could use from .NET env.
 i have wrote the following code in C# :
private int status=0; 

private Document tdoc = new Document(); 

 string optFile = System.Web.HttpContext.Current.Server.MapPath("config.tidy"); 

status = tdoc.LoadConfig(optFile);

status = tdoc.ParseString(input); 
status = tdoc.CleanAndRepair();

status = tdoc.RunDiagnostics();

tdoc.SetOptBool(tidy.TidyOptionId.TidyForceOutput, 1 );

status = tdoc.SaveFile(System.Web.HttpContext.Current.Server.MapPath("

//this is the line with my problem

string tmp = tdoc.SaveString();

 when i have checked the tmp string in dubug time i saw it is NULL.

 something is wrong with the function SaveString? or am i missing something 

 also i have searched the WEB and found documentation about a tidy dll that 
has more functions, like SaveBuffer...

 HELP !!!!!!!!!!!!!!!!!!!!!!!!!!


Received on Sunday, 18 September 2005 00:44:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:55 UTC