MySQL Forums
Forum List  »  Connector/Node.js

MySQL 5.1 - XPath Question
Posted by: Petar Petrov
Date: March 01, 2007 07:10AM

Hi all,

For my project I have to use the new MySQL 5 built-in XPath Support.

However, I've come across the following problem:
Sometimes XML documents have several tags of the same type. For example:

<book>
<author>a1</author>
<author>a2</author>
<author>a3</author>
<book>

to query for the authors I use: select ExtractValue(column_name, 'book/author') from table_name;

it returns all the authors, separated with white space as follows: a1 a2 a3

This is pretty inconvenient for parsing if a single author has two names.

So, do you know any way to make MySQL return the result with any other separator string, except for white space.
Or at least any way to get the authors separately with no confusion?

I'd be very grateful if you can help!!!


Regards,
Pesho

Options: ReplyQuote


Subject
Written By
Posted
MySQL 5.1 - XPath Question
March 01, 2007 07:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.