Problem sorted!

As I was expecting, it was a failure in my understanding of XPath.

Bascially, by passing the "wotsit" element though to the function, I'm
guessing that what is happening is that the XML object is actually the
complete XML document structure but with a pointer to the particular
node (the "context node").  That would explain why it seems that the
full XML document is available, even though I'm only passing through a
bit of it.

So, by using an absolute location path ("/wotsit/foo") like I was
trying, it's actually using the root node of the XML doc, not the
context node.  Instead of this, I tried using a relative path ("foo")
which, wouldn't-ya-know-it, returned the node I was after!

That's what comes of having stupid long documents that people don't have
the time or inclanation to read though properly to find out the
intricacies ;o) : http://www.w3.org/TR/xpath

Tim.


-------------------------------------------------------
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
-------------------------------------------------------
rawnet ltd
Atrium Court
Bracknell                    [EMAIL PROTECTED]
Berkshire                    Tel : +44 (0) 1344 393 040
RG12 1BW, UK                 http://www.rawnet.com
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------




> -----Original Message-----
> From: Paul Johnston [mailto:[EMAIL PROTECTED]] 
> Sent: 04 December 2002 17:35
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] XML + XPath
> 
> 
> Okay, I may be wrong, but...
> 
> When you do parsing and stuff on an XML document, you usually 
> end up with things like Nodes.  Now a document is not a type 
> of Node (Java
> Object-wise) so what could be happening is that you are 
> trying to do a function on a Node and not a Document.  Try 
> doing xmlParse on the retrieved Node (ie wotsit) before doing 
> an xmlSearch on it.
> 
> HTH
> 
> Paul
> 
> PS I haven't played with it yet, but that would make sense.
> 
> Paul Johnston
> Technical Architect
> PJ Net Solutions Ltd
> http://www.pjnetsolutions.com
> +44 (0)7866 573013
> 
> 
> 
> 
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED] For human help, e-mail: 
> [EMAIL PROTECTED]
> 
> 
> 



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to