MYSQL version 5.1.5 has functions for searching and changing XML documents.
(
http://dev.mysql.com/tech-resources/art ... 1-xml.html)
I created a table using the following sql
create tabel test(details nvarchar(100));
insert into test (details) values('<all>this is a test</all>');
In mysql console, The following sql works well:
mysql>select extractvalue(details, '/all') from test
the result is:
+------------------------------------------+
| EXTRACTVALUE(details,'/all') |
+------------------------------------------+
| this is a test |
+------------------------------------------+
However, I got the following error messages after introducing hibernate:
java.util.List results=session.createQuery("select extractvalue(test.details,'/all') from test.test test");
java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'ExtractValue' {originalText=ExtractValue}
\-[EXPR_LIST] SqlNode: 'exprList'
+-[DOT] DotNode: 'testx0_.details' {propertyName=details,dereferenceType=4,propertyPath=details,path=test.details,tableAlias=testx0_,className=test.test,classAlias=test}
| +-[ALIAS_REF] IdentNode: 'testx0_.id' {alias=test, className=test.test, tableAlias=testx0_}
| \-[IDENT] IdentNode: 'details' {originalText=details}
\-[QUOTED_STRING] LiteralNode: ''/details''