在用xsl将xml文件中的内容提取出来时,为什么总有这个:

sunrain_114 2003-08-13 09:08:03
我在用xsl将xml文件中的内容提取出来时,为什么总有这个:<?xml version="1.0" encoding="UTF-16"?>,是我的xsl写错了?该如何改动呢? 求教了!
还有,
比如说我的xml文件中
<Time>20030714 11:23</Time>
我现在只能提取出20030714 11:23,而我只想要20030714,请问该如何写xsl,才能达到我的要求呢?
...全文
40 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2003-08-13
  • 打赏
  • 举报
回复
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:template match="Time">
<xsl:value-of select="substring-before(.,' ')" />
</xsl:template>
</xsl:stylesheet>
sunrain_114 2003-08-13
  • 打赏
  • 举报
回复
谢谢saucer,但是我还是不知道如何把:<?xml version="1.0" encoding="UTF-16"?>去掉
saucer 2003-08-13
  • 打赏
  • 举报
回复
if you are using IE, that is the default encoding, if you are using .NET or Java, there is a way to set output encoding

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧