Saxon is the parser we are going to use through the semester and it can be runned through a console or with kernow. Both requires that you have if you have java installed and below are the two different was of using the two types of software.

SAXON console

Below are to files which can be used for running XQuery and XPath for saxon after you have downloaded it here and unzipped it. The files needs to be run the same directory as the unzipped saxon files, one is for windows the other for linux

windows linux

further documentation can be found here

if you want to use xslt use the following files they take the parameters: 'inputfile' 'stylesheet'
and then print to the console unless you add -o:outputfile

windows linux
SAXON with kernow

There also seems to be a nice fellow who made a gui for saxon which would make working with it a bit easier this can be found here as zip file

Saxon can be used for the same as saxon there are certain tricks though that you need to use.
For example if you want to test an xpath expression you have to wrap it in a XQuery. *** DANGER *** this wrapping will not work if you query multiple attributes with the same name because they need to be attached to a node and in this case we only have <result>.

<result>{doc('C://wherexmlislocated//file.xml')//element[4]}</result>
The following picture is a running version of kernow where we are on the tab "XQuery sandbox" marked red, then we input our "xpath expression" marked yellow, and finally we press "Run Transformation" marked green. This will return the tree found by the xpath expression.

The xml this is run on is axes.xml and as you can see the xml is wrapped inside of the result element if we would have searched for //foo/@bar the result would have been <result bar="baz"/>

NAMESPACES
For some XPath expressions you need to use namespaces, lets say we have the namespace xmlns:rcp="http://www.brics.dk/ixwt/recipes" and we want to find the elements //desciption which in this case would be //rcp:description. To run that XPath expression in kernow it is necesary to add a namespace binding. This is done by clicking the orange marked "namespace"-button, as shown in the picture above. This will pop-up a small frame where you have to "add binding" and input the prefix in the left column and press enter, then in the right you add the uri in the right column and again press enter. Lastly press "save and close" and even though kernow complaints you should be done. this means you should in the previous example have rcp in the left column and http://www.brics.dk/ixwt/recipes in the right.
If this just wont work for you the another way is adding a line before <result> and write
declare namespace rcp="http://www.brics.dk/ixwt/recipes";
which should do the same trick.