以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 Semantic Web(语义Web)/描述逻辑/本体 』 (http://bbs.xml.org.cn/list.asp?boardid=2) ---- [求助]SPARQL查询怎样去掉输出中的前后缀? (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=121454) |
-- 作者:licmi -- 发布时间:9/13/2011 12:17:00 AM -- [求助]SPARQL查询怎样去掉输出中的前后缀? 如: http://www.owl-ontologies.com/Ontology1312045746.owl#数字电视 2011^^http://www.w3.org/2001/XMLSchema#int 浅谈三网融合与数字图书馆的发展^^http://www.w3.org/2001/XMLSchema#string 去掉其中的: http://www.owl-ontologies.com/Ontology1312045746.owl# ^^http://www.w3.org/2001/XMLSchema#int ^^http://www.w3.org/2001/XMLSchema#string
|
-- 作者:bigfatcat1987 -- 发布时间:9/15/2011 2:37:00 PM -- strSP.substring(0,strSP.indexOf('#') + 1)就可以了 其中StrSP是你定义的字符串如String strSP = c.getURI() |
-- 作者:licmi -- 发布时间:9/16/2011 4:40:00 PM -- 感谢2楼可贵的回复,用substring和indexOf的确可以解决问题 |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
9,253.052ms |