Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XPath functions with XML DOM 1

Status
Not open for further replies.

JontyMC

Programmer
Nov 26, 2001
1,276
GB
Why do I get this error?

Error Type:
msxml3.dll (0x80004005)
Unknown method. /comics/comic[-->contains(name<--, '')]
/AC/search.asp, line 13

In fact, looking at it, it appears I can't use any XPath functions. What gives?

Jon
 
Looks like you are mixing thread models there, a quick search on google brings back this:



Mixing Threading Models
You can not move a node from a neutral-threaded DOM (Micorosft.XMLDOM) into a free-threaded DOM (Microsoft.FreeThreadedXMLDOM) and vice-versa. You must reparse the source document using the same thread model as the target document. The error is 0x80004005 XMLOM_INVALID_MODEL.

Similarly, you can not transform a neutral-threaded DOM using a stylesheet that's in a free-threaded DOM and vice-versa
 
Actually scrap that answer, sorry. Wrong error message!

I think you need to add

domDoc.setProperty("SelectionLanguage", "XPath");


That'll teach me to surf late at night and trust googles first link!!



 
Thanks for that. Microsoft's MSDN is particularly crap for getting this sort of info.

You would've thought it would default to XPath.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top