Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<root> <url> <str>http://test.com/test.csv</str> <str>http://example.org/rsgis.html</str> <str>http://something.edu/thro.zip</str> </url> </root>
使用 Xpath,我只能找到 url 的文件扩展名(csv 或 html 或 zip)。任何帮助是极大的赞赏..
提前致谢。
使用/root/url/str/replace(tokenize(., '/')[last()], '.*\.', ''). 或者实际上不需要标记化,您可以删除所有内容,包括最新的.点/root/url/str/replace(., '.*\.', '')
/root/url/str/replace(tokenize(., '/')[last()], '.*\.', '')
.
/root/url/str/replace(., '.*\.', '')