XMLType, existsNode and Namespaces
I've been using the XMLType in a database table to store XML data. I've been writing a data access object which allows callers to retrieve all rows whose XML data have various element and/or attribute values. I've been able to do this using existsNode and constructing the appropriate XPath expressions to support this. While the data within the table did not have any namespace declarations, this worked fine.
However, once the data made namespace declarations (something that will be the standard, not the exception), the existsNode functions would not find the previously locatable elements (attributes seem fine). I can only assume that the engine executing the XPath expression is using a different default namespace to that which is defined within the XML data.
Is there any way to instruct the existsNode (and similar functions) which default namespace to use? Otherwise, I'm going to have to abandon Oracle's implementation of this functionality, reading all the data out to do the checks myself. :(
Any help would be appreciated.
Thanks,
Ed