TransformNodeToObject的问题

请问各位,我使用msxml4.0和vc6,有以下几个问题

1)为什么使用TransformNodeToObject总是得不到正确的结果树,我参考的是msxml4
sdk中的例子,例子如下,
// p is the XML source that is to be transformed, pXSL is the style sheet.
// Create an empty DOM document for the result. (Error checking omitted
// for brevity.)
hr = CoCreateInstance(CLSID_DOMDocument40, NULL, CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument, (void**)&p);
hr = p->QueryInterface(IID_IDispatch, (void **)&pDisp);
vObject.vt = VT_DISPATCH; // the new object
vObject.pdispVal = pDisp;
hr = p->transformNodeToObject(pXSL, vObject); // Transformation is
// present in pDoc.

但是p->xml总是为空,也就是得不到xslt转化好的结果树。而我使用transformNode则可以得到xslt转化好的结果字符串。有高手是否可以帮忙解答?

2)xslt转化在客户端进行与在服务器端进行的比较(难度和时间比较),能否告诉?
---------------------------------------------------------------

1. see
http://www.perfectxml.com/CPPMSXML/20020711.asp

2.
xslt转化在客户端进行: the client browser requirement is higher
xslt转化在服务器端进行: affects the scalability of the server

speed-wise, as long as the files are not big, the difference shouldn't be noticeable

Published At
Categories with Web编程
comments powered by Disqus