XQuery

I am new to Xquery. I have got Xml file and want to write an xquery for that. my xml file is like: test.xml file is:



AAA
P1
10.00



and xquery is

doc(“test.xml”)

now my question is where should i write this xquery file and how do i execute this and what should be it’s file extension. should i use this query in xsl or should i embed this in any file.

what is the flow ?

early help would be appriciated.

Thanks.
HemZ.