Which is the best way to convert xml to html, currently i am using Xpathnavigator and xpathnodeiterator to query and traverse the xml. This works fine, but i need to convert
Instead of converting xml to html you can style the xml document itself, you can read more about that documentation, w3 for xml stylesheets, Styling XML Documents with CSS and adding style to xml
There are several XSLT processors that can be invoked from C#. The Microsoft one only supports XSLT 1.0 (but that may be adequate for your needs, depending on the complexity of the transformation). There are two processors that support XSLT 2.0 for this environment: Saxon and XQSharp. Although there is a learning curve associated with XSLT, the code will be much more maintainable than any thing you write using DOM-level C# coding.
XML file can be transformed to HTML using XSLT.