Anusha has asked for the wisdom of the Perl Monks concerning the following question:
I have a scenario like...
<a>Test case 1 <b>Test case 2 <c>Test case 3 </c> </b> </a>
I need to fetch the text content of <c> node where multiple space is found betweeen words. The pattern I am using is
<code>//*[*contains(.," ")]<code>But the pattern matches 3 different datas
1) Test case 1Test case 2Test case 3 (text content of "a tag""b tag""c tag" is appended)
2) Test case 2Test case 3 (text content of "b tag""c tag" is appended)
3) Test case 3 (text content of "c tag")
But I need only the text content of <c> node...Please help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need help for Xpath patterns
by roboticus (Chancellor) on May 25, 2012 at 10:35 UTC | |
|
Re: Need help for Xpath patterns
by choroba (Cardinal) on May 25, 2012 at 12:02 UTC | |
|
Re: Need help for Xpath patterns
by Anonymous Monk on May 25, 2012 at 10:30 UTC | |
|
Re: Need help for Xpath patterns
by locked_user sundialsvc4 (Abbot) on May 25, 2012 at 15:50 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |