Port HtmlAgility Pack to Metro App

Topics: Developer Forum, Project Management Forum, User Forum
Jul 18, 2012 at 11:02 AM

Hello,

I created a Blank XAML metro app using VS2012 RC. Have written some C++ code to do some tasks. I need to parse HTML content in my task. I tried with XmlDocument object. But it seems doesn't work for me. I came across Html Agility Pack and downloaded the packages. The downloaded package contains dll's.

 But how can I port this into my project and can use the functionalities. Could some one suggest me on this.

Please help me.

Regards,

Krish

Jul 18, 2012 at 12:50 PM

Porting an existing C# dll to be a full WinRT Metro assembly is not trivial. I recently gave a presentation on how to do this.

Here are the basic steps

  1. Take the existing experimental Win8 Metro C# project in the source control here on codeplex. Under the solutions folder you'll find the HtmlAgilityPack.Metro.sln file
  2. Next is to go through every public class and change it to sealed
  3. Then go through and make sure no fields are exposed publicly
  4. The ugly part is at hand, compile and start fixing any other compilation errors

I currently have not attempted to do this with HAP for a few reasons. 1 I know it may be a long process to get it all working and 2 it will probably introduce breaking changes for the other versions of HAP.

Jul 19, 2012 at 9:13 AM

Hello darthobiwan,

Thanks for your replay and advise.

This process may take time for me to complete.

Regards,

Krish