problem using xquery and asp.net

A

amessimon

Hi

I'm having a problem querying an XML document using Xquery, i dont know if
this is the right place to post, but i couldnt find an xquery newsgroup.
Ive also posted in the xml group. Ive not used xquery before and cant find
much documentation online regarding the problem i am encountering.

Im running the following code, which is a simple query....(ive included all
of it as its short and for the sake of completeness).

########################################################

<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="Microsoft.Xml.XQuery" %>
<%@ Import NameSpace="System.IO" %>
<script language="vb" runat="server">
Sub page_load()
Dim col as New XQueryNavigatorCollection()
col.AddNavigator(server.mappath("test.xml"), "foo")
Dim query as String
query = "for $x in doc(""foo"")/SEARCHRESULTS/RESULTSET/RESULT " & _
"where $x/URL = ""somestring"" " & _
"return $x/REDIR"
Dim expr as New XQueryExpression(query)
Dim rawXML as String = (expr.Execute(col)).ToXml()
End sub
</script>

########################################################

This returns the following exception

"Microsoft.Xml.XQuery.XQueryException: User Defined Functions not supported.
"

Im puzzled as to why this is as I can see nothing wrong with the query?

Thanks for any advice in advance

amessimon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top