[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Xpath problem

Subject: Re: Xpath problem
From: "Kanthi Damodaran" <kdsm17@xxxxxxxxxxx>
Date: Wed, 06 Mar 2002 20:31:59 +0000
selectsinglenode nodeexists

Hey Jeni


Here is some more of the code that I am using

objCachedDOM is a MSXML2.FreeThreadedDOMDocument

Set objCachedDOM = Application("CachedXMLDOM").cloneNode(true)
Set objCurrNode = m_objIndGlobalDOM.documentElement.selectSingleNode(strXPath)
varTemp = objCurrNode.childNodes.length
If varTemp <> 0 Then
blnNodeExists = vbTrue
Else
blnNodeExists = vbFalse
End If
NodeExists = blnNodeExists


I have noticed that when you use the free threaded model many of the methods and properties give problems. And I have to use free threaded because Apartment Threaded components can't reside in an Application object.

Thanks
Kan

From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Reply-To: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
To: "Kanthi Damodaran" <kdsm17@xxxxxxxxxxx>
CC: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Xpath problem
Date: Wed, 6 Mar 2002 13:35:29 +0000

Hi Kan,

> Thanks for the input, I think its very likely that this could be the
> problem. But I tried what you suggested and couldn't get it to work.
> I am using a cached DOM and calling it thus
>
> Set objCachedDOM = Application("CachedXMLDOM").cloneNode(true)
>
> And I assume this should still work if I did the following : -
>
>    objCachedDOM .setProperty("SelectionLanguage", "XPath")
>    objCachedDOM .selectSingleNode("//Outer[value = '2111']")

I guess that a possible problem is if the cached DOM isn't of the
right kind. Are you sure that the objCachedDOM is a Msxml2.DOMDocument
(from MSXML3 or MSXML4)? I doubt it's the problem, since the
setProperty method would probably raise an error otherwise.

Another possibility would be that the problem is somewhere else in the
process. Are you sure that when you check the node that you've
selected that you're checking it properly? Perhaps you could send more
of the code that you're using in case there's a problem there.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.