MySQL Forums
Forum List  »  Connector/Node.js

Re: unexpected result in ExtractValue
Posted by: Alexander Barkov
Date: December 01, 2006 04:12AM

Tag with only digit characters in their names are not valid in XPath.
That was a bug that MySQL tried to interpret this kind of queries.
In later versions of MySQL it was fixed and error is now returned:


Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.1.14-beta-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> set @xml='<zot>
'> <tim0>
'> <01>10:39:15</01>
'> <02>140</02>
'> <03>90</03>
'> </tim0>
'> <tim1>
'> <01>12:19:10</01>
'> <02>149</02>
'> <03>100</03>
'> </tim1>
'> </zot>';
Query OK, 0 rows affected (0.00 sec)

mysql> select ExtractValue(@xml,"/zot/tim0/02");
ERROR 1105 (HY000): XPATH syntax error: '02'

Options: ReplyQuote


Subject
Written By
Posted
Re: unexpected result in ExtractValue
December 01, 2006 04:12AM


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.