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.
我有这个XML:
XML
<entry> <title handle="foo">Foo</title> </entry>
如何handle使用 获取属性的第一个字母XSLT 1.0?
handle
XSLT 1.0
谢谢你的帮助。
您可以使用substringXPath 函数。
substring
例如,对于您的示例 XML,以下 XPath 表达式将计算为“f”。
substring(/entry/title/@handle, 1, 1)