I need to convert a given XQuery to tree. Is there any API for doing this? If not what is the best structure to store the xquery? Is TreeMap ok? Please help.