Add json format support

- New index currently supporting xml and json format (format param)
- Update new xquery parser
- Provide a directory from index page (dir param)