Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Xquery problem in Sql Server 2005

Author  Topic 

tramvai
Starting Member

7 Posts

Posted - 2009-11-28 : 17:29:01
Hello. I am using Sql Server 2005. I have a file called "select.xml" which has the path "C:\select.xml".

When i try to use Xquery to acces it's content, i receive an error message.
I'm using

doc("file:///C:\select.xml")/bookstore/book/title

, an i receive Incorrect syntax near 'file:///C:\select.xml'.
What's wrong with that syntax? I admit it's the first time i use XQuery.
Also when i control + click the file link, sql server open the xml file, so i guess it's not a file path problem.

Please give me a hint.
Thank you.


Give me an A ... ARSENAL

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-11-29 : 12:51:39
Xquery is used within a xml value. you cant use xpath to search within xml file by just giving file name.
Go to Top of Page
   

- Advertisement -