Re: Separating return values.
Tommi Pisto wrote:
> So, in the last example (val5) two values were
> returned and those were separated using space
> character. What if one of those two values
> contains also space chracters. Is it impossible
> then to figure out how many hits there were?
No:
mysql> select ExtractValue('<a>ccc<b>ddd</b><b>eee</b></a>', 'count(//b)') matches;
+---------+
| matches |
+---------+
| 2 |
+---------+
1 row in set (0.00 sec)
> Now one would separate Value 1 and 2 from the
> result. How is that possible?
>
Ah! that won't be possible. I mean, of course, you can find spaces and do asubstring, but you cannot know if the space is a generated, 'separating' space, or if the space is part of the original content.
On the other hand, If you know your format, you can iterate through the distinct elements:
http://rpbouman.blogspot.com/2006/03/importing-xml-data-into-mysql-using.html