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 是:
<root> <emps> <emp id="1" name="alpha" city="tt" /> <emp id="2" name="beta" city="pp" /> <emp id="3" name="gamma" city="tt" /> </emps> </root>
我想用 city='tt' 的所有员工填写组合列表
提前致谢。
<select> <xsl:for-each select="root/emps/emp[@city='tt']"> <option > <xsl:value-of select="@name"/> </option> </xsl:for-each> </select>
这是关于属性选择的查询的答案。