I think without modification to your XPath, the task is not only difficult,
but impossible. I don't see any possibility how plain fooResponse
in your XPath expression could match with namespace qualified fooResponse
element in your document.
If you want to use XPath and match names regardless namespaces,
the name() test is the only solution I can find.
The original XPath expressions can be turned to name() variant programmatically (below is my first try).
sub name_matching_xpath {
my ($xpath) = @_;
return join '/',
map { /^([a-z0-9:-]+)(.*)$/i ? "*[name() = '$1']$2" : $_; } sp
+lit '/',
$xpath;
}
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|