Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. FreeThreadedDOMDocument problem of selectsinglenode

FreeThreadedDOMDocument problem of selectsinglenode

Scheduled Pinned Locked Moved XML / XSL
helpannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chandra shekar Machipeddi
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • C Chandra shekar Machipeddi

      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

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      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

      C 1 Reply Last reply
      0
      • L 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

        C Offline
        C Offline
        Chandra shekar Machipeddi
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups