Hi all,

      In an xml file like this:

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/1999/XMLSchema";>
   <SOAP-ENV:Body>
      <m:getTemp xmlns:m="urn:xmethods-Temperature"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
        <zipcode xsi:type="xsd:string">94041</zipcode>
      </m:getTemp>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

      how does one gather up all the prefixes so that they are all known
when you want to evaluate an xpath expression against this file using
standalone xpath ( ie, no stylesheet)? I am not an xpath expert and I've
only begun to try using Xalan.    I suppose for one thing I don't
understand how to
use the PrefixResolver class to accomplish anything useful.  I don't like
having to use something like XPathEvaluator.evalute() on all nodes down to
the one I"m interested in and ignoring exceptions received for unresolved
prefixes down to the one that might have it ( ie, the node I'm on, as in
the m:getTemp node), successively. That's why I'm wondering if there is a
way to just gather up all the prefixes, make them 'known' for the whole
document, and then from then on the xpath expressions someone tries against
this file should not be 'not found' or cause exception based on unresolved
prefixes.

Thanks,
Suzanne

Reply via email to