FreeThreadedDOMDocument problem of selectsinglenode
-
hai.. I have a object like as below.. which is a FreeThreadedDOMDocument old version Dim xslDoc As MSXML2.FreeThreadedDOMDocument now i am just upgrading to FreeThreadedDOMDocument60 for that i have written Dim xslDoc As MSXML2.FreeThreadedDOMDocument60 there after am having the line of code like this xslDoc.loadXML STR_XSL1 xslDoc.selectSingleNode(STR_XPATH_PRIORITY_SORTORDER).nodeValue = " " am getting error like object variable or with block variable not set ..if i use FreeThreadeddomdocument60.. if not used it then its working fine.. thanks in advance if any one come with answer.. Chandu
-
hai.. I have a object like as below.. which is a FreeThreadedDOMDocument old version Dim xslDoc As MSXML2.FreeThreadedDOMDocument now i am just upgrading to FreeThreadedDOMDocument60 for that i have written Dim xslDoc As MSXML2.FreeThreadedDOMDocument60 there after am having the line of code like this xslDoc.loadXML STR_XSL1 xslDoc.selectSingleNode(STR_XPATH_PRIORITY_SORTORDER).nodeValue = " " am getting error like object variable or with block variable not set ..if i use FreeThreadeddomdocument60.. if not used it then its working fine.. thanks in advance if any one come with answer.. Chandu
m_chandu wrote:
FreeThreadedDOMDocument old version
It has been a while since I used MSXML so this is from old memory. Early versions of MSXML implemented pathing syntax ( I think it was called XSL Path or something ) before XPath was approved. Some Later versions added support for the XPath standard, but also maintained backwards compatibility for the original syntax, and defaulted to the using the old syntax. If your XPath statement contains any of the new XPath features you have to tell the DOM to use the XPath syntax. I think you have to use some generic like method [ .setProperty(.....) or something ] and pass the correct string values to setup the DOM to use XPath.
led mike
-
m_chandu wrote:
FreeThreadedDOMDocument old version
It has been a while since I used MSXML so this is from old memory. Early versions of MSXML implemented pathing syntax ( I think it was called XSL Path or something ) before XPath was approved. Some Later versions added support for the XPath standard, but also maintained backwards compatibility for the original syntax, and defaulted to the using the old syntax. If your XPath statement contains any of the new XPath features you have to tell the DOM to use the XPath syntax. I think you have to use some generic like method [ .setProperty(.....) or something ] and pass the correct string values to setup the DOM to use XPath.
led mike
hai led thanks for giving the reply but i have placed the property even though am getting error what i mentioned above.. below is the total code what i have.. Dim xslDoc As MSXML2.FreeThreadedDOMDocument60 Set xslDoc = New MSXML2.FreeThreadedDOMDocument60 xslDoc.setProperty "SelectionLanguage", "XPath" xslDoc.setProperty "SelectionNamespaces", "xmlns:xsl='http://www.w3c.org/1999/XSL/Transform'" xslDoc.setProperty "AllowXsltScript", True xslDoc.async = False xslDoc.validateOnParse = False xslDoc.loadXML strXML xslDoc.selectSingleNode(STR_XPATH_PRIORITY_SORTORDER).nodeValue = " " the last line is giving us error if we have FreeThreadedDOMDocument60.. without 60 its working fine.. thanks chandu.M