MySQL Forums
Forum List  »  Connector/Node.js

Re: XPath Problem - can't get the tag name of a node...
Posted by: JP TS
Date: August 16, 2007 03:36AM

I have built a quick fix for this problem ( i needed this to to recursively walk XML within a stored procedure ) and will share it with you.

It requires you to build MYSQL from the falcon source.

platforms:
both tested for win32 ( no vista!) x86 and linux x86

mysql version details:

mysql Ver 14.13 Distrib 6.0.0-alpha, for pc-linux-gnu (i686) using EditLine wrapper

output example:

mysql> SELECT EXTRACTVALUE('<Address>AA<Street cat="awesome">Test straat</Street></Address>','name(/child::*[1])');
+------------------------------------------------------------------------------------------------------+
| EXTRACTVALUE('<Address>AA<Street cat="awesome">Test straat</Street></Address>','name(/child::*[1])') |
+------------------------------------------------------------------------------------------------------+
| Address |
+------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

configure command win32:
C:\mysql_xml_project\mysql-6.0.0-alpha>win\configure WITH_INNOBASE_STORAGE_ENGINE WITH_PARTITION_STORAGE_ENGINE WITH_FALCON_STORAGE_ENGINE WITH_ARCHIVE_STORAGE_
ENGINE MYSQL_SERVER_SUFFIX=-pro
be sure to install cmake and bison.

configure command linux:
./configure --prefix=<installlocation>

required files for update:

download the following files, update your mysql falcon and recompile.

<a href="http://84.29.21.81/community/mysql/falcon/item_xmlfunc.cc">item_xmlfunc.cc</a>;
<a href="http://84.29.21.81/community/mysql/falcon/item_xmlfunc.h">item_xmlfunc.h</a>;

place them in the sql directory of your source distribution.

Options: ReplyQuote


Subject
Written By
Posted
Re: XPath Problem - can't get the tag name of a node...
August 16, 2007 03:36AM


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.