How to get file extension in Marklogic Server?
问题 I want to get the file extension of uploaded file in Marklogic server. I know how to get the file name. But that gives filename plus extension like new.txt. But I want only extension not the full file name. How can I get just the file extension ? 回答1: There are many methods of getting file extensions from filename. For instance you can use functx:substring-after-last($filename, '.') or other methods (fn:substring-after) of getting substring after dot. Please see: xqueryfunctions.com P.S. fn