Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: transformNodeToobect [Thread Next] Re: transformNodeToobectTo: NULL Date: 1/25/2009 12:50:00 PM Thanks for the reply. I got that sample to work. The problem was that it didnt like the header "the namespace and version tags" . I had created the XSLT using VS2005 which generated such a header. When I rearranged the header tags, it could successfully do the transformation. Regards, Saju "Martin Honnen" <mahotrash@y...> wrote in message news:ujbG3FVfJHA.1288@T...... > Saju Paul wrote: > >> I am using MSXML2 and transformNodeToObject method to generate a html >> file in C++ app. The method returns S_OK but the file is empty. I tried >> using the same XML and XSLT files in a C# app and it correctly generates >> the html file. >> >> I have used the sample demonstration code available on >> http://www.informit.com/articles/article.aspx?p=169497&seqNum=2 >> >> Any pointers as what could be going wrong. > > That article seems to transform XML to XML so using an MSXML DOM document > as the result object in transformNodeToObject works in that case. However > if you want to transform XML to HTML then you can't transform to an MSXML > DOM document as the HTML result is not well-formed XML. So you need to > transform to a different object like an ADODB.Stream or you need to use > transformNode instead to get a string result and use other APIs in C++ to > save that string to a file. > > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
