1、查询含有London的国家信息(选择)for $p in //countrywhere contains($p,"London")return $p
2、查询含有Caesar的莎士比亚戏剧对话for $speech in //SPEECH[LINE &= 'Caesar' ]return $speech
3、查询Hamlet对白中含有faith的语句for $speech in //SPEECH[SPEAKER &= 'HAMLET' and near(., 'faith')]return $speech
4、查询含有exam的学生信息for $p in //stuwhere contains($p,"exam")return $p
5、使用URL请求eXisthttp://localhost:8080/exist/servlet/db/?_query=for $p in //stu where contains($p,"exam") return $p