Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6539653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:53:04+00:00 2026-05-25T10:53:04+00:00

I am using VC++ 2010 Express and I am attempting to include HTML Tidy

  • 0

I am using VC++ 2010 Express and I am attempting to include HTML Tidy to perform cleanup on HTML code strings. What I want to do is process the HTML as a string (NOT from a file) and save the processed cleaned HTML to a string (NOT to a file). The project is a C++ Windows forms project, the compiler is /CLR.

I have attempted, more times than I care to admit, to attach Tidy to my project in various ways. I have failed in every attempt and I’m just not sure where to go from here. The most promising was a .NET wrapper called TidyManaged, but I could not find any documentation to explain how to use it with C++ (it appears to have been meant for C#). The various C++ wrappers are not working for me at all. It seems the documentation is extremely lacking on how to make them work.

Also I am prepared to accept a solution that does not use tidy at all, but some other equivalent HTML cleanup tool. I am concerned about the age of Tidy (August, 2000) and whether it is still effective for today’s newer XHTML standards.

Also if it’s possible, I am willing to incorporate a C library into my code directly without relying on a DLL, but I have no knowledge on how to make this work or even if it can work.

Any suggestions on how to go about this would be greatly appreciated, keeping in mind that this is HTML we are talking about here (often times malformed HTML and XHTML) and NOT XML.

Thanks in advance!

PS – I am new to C++ :/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:53:04+00:00Added an answer on May 25, 2026 at 10:53 am

    It’s been almost 48 hours struggling with this problem. Solution discovered! Here it is…

    Using the very simple .NET wrapper from here http://www.codeproject.com/KB/cs/ZetaHtmlTidy.aspx converted the VC project to VC++ 2010 ok and compiled as a DLL ok. Below is the code I used to call it:

    System::String^ TidyMyHTML(String^ MyHTMLString)
    {
        using namespace ZetaHtmlTidy;
        HtmlTidy tidy;
        String^ s = tidy.CleanHtml( MyHTMLString, HtmlTidyOptions::ConvertToXhtml );
        return s;
    }
    

    Hopefully this post will spare someone else from going through the same thing.

    EDIT:

    Taking this a step further I was able to convert the VC++ 2008 project files from the tidy source attached to the wrapper and upgrade them to VC++ 2010 project files. I was then able to compile the tidy project (separate from his wrapper class project) into libtidy.lib static libraries (both release and debug). I was then able to incorporate his wrapper class into my application and point to the include and lib files. The end result was exactly what I wanted, a solution that incorporates tidy into my application without needing to have a dll dependency. This whole experience has accelerated my learning curve for attaching C libraries to my C++ applications.

    Thanks for the suggestions, and I hope someone finds this post useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Visual C# 2010 Express (final, not beta or anything) and I'm having
I'm using VS 2010 Express and I've written an app that I want to
I'm new in VB, i'm using VB 2010 Express and I want to change
I'm using VS Team System 2008 and gonna install VS 2010 Express editions.
I am using VS 2010 RTM and trying to perform some basic validation on
So I'm using C# 2010 Express and wondering what the best toolset is for
I'm having problems deploying my website to the live server using VWD 2010 Express.
I'm using Visual Basic 2010 Express. I have a form that can be minimized.
I'm using Visual C# 2010 Express RTM with Windows Phone Developer Tools April CTP
I'm using VB 2010 Express. I have a loop that calls a function named

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.