put_nodeTypedValue
-
Hi Gurus, I have a greate trouble while updating the value of text node. I have a pointer to the node from existing XML document: ---------------------- IXMLDOMNodePtr pNode; TCHAR szTmp[100]; VARIANT varTmp; _stprintf(szTmp,"%d",newid); varTmp.vt=VT_BSTR; varTmp.bstrVal=_bstr_t(szTmp); hr=pNode->put_nodeTypedValue(varTmp); // hr returns E_FAIL under IE 5.x :-( ---------------------- This works on systems with IE 6.0 installed. This doesn't work on systems with IE 5.x installed. Please help me! How to update the node on systems with IE 5.x installed ? I'm a XML novice so any ideas appreciated. Yours sincerely, Alex Bash
-
Hi Gurus, I have a greate trouble while updating the value of text node. I have a pointer to the node from existing XML document: ---------------------- IXMLDOMNodePtr pNode; TCHAR szTmp[100]; VARIANT varTmp; _stprintf(szTmp,"%d",newid); varTmp.vt=VT_BSTR; varTmp.bstrVal=_bstr_t(szTmp); hr=pNode->put_nodeTypedValue(varTmp); // hr returns E_FAIL under IE 5.x :-( ---------------------- This works on systems with IE 6.0 installed. This doesn't work on systems with IE 5.x installed. Please help me! How to update the node on systems with IE 5.x installed ? I'm a XML novice so any ideas appreciated. Yours sincerely, Alex Bash
Install MSXML version 3. It's available from the Microsoft site. As a bonus, it supports proper XSLT, whereas the standard did not exist when IE 5.x came out, so they had to make some guesses..... Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
Install MSXML version 3. It's available from the Microsoft site. As a bonus, it supports proper XSLT, whereas the standard did not exist when IE 5.x came out, so they had to make some guesses..... Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
Correction: Install MSXML version 4. Without installing and still running on those "IE5.x systems", I suggest assigning the value to nodeValue (instead of nodeTypedValue), and validate when parsing. Where does your element get the type info from? Schemas, or DTD? What is the node's dataType value? I would assume both IE5.x and IE6.0 have a different opinion about the node's data type... Bernd