Subject:Convert HTML to XML within C# application Author:Gregory McKenzie Date:15 Dec 2009 07:00 AM
We am currently trying to use XQuery to extract content from HTML. Stylus Studio has a Document Wizard to convert HTML to XML and we have been able to develop and test our XQuery expression on a converted HTML page. We have also been able to generate our c# source code using the Generate Code function under the XQuery menu and get this working on the converted HTML page. However, we cannot apply our XQuery expression directly to downloaded HTML content - we need to pass it through the Document Wizard to convert HTML to XML before we can run our xQuery expression on it. Is there a way to integrate the conversion of HTML to XML in our C# code? Alternatively, is there a property we need to change on the resolver or something else to allow the xQuery expression to be executed against downloaded HTML from within a C# application?