xml - Return Statement in Xquery -


i want change current return statement in xquery, :

return  <p>xml file stored successfully</p> 

i want make return statement capable of handling situation if there error, return error code user, if there no error, return message above user.

i think if-else construct should placed under return purpose. have no idea condition should there if, experts little? in advance.

the xquery 3.0 working draft introduces try-catch expressions, might looking for:

declare namespace err = "http://www.w3.org/2005/xqt-errors";  let $x := "string" return   try {     $x cast xs:integer   } catch * {     $err:code (: variable contains error code :)   } 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -