<word>bird</word>
</c:if>
<c:if test=”${fn:startsWith(‘blur’, word)}”>
<word>blur</word>
</c:if>
<c:if test=”${fn:startsWith(‘call’, word)}”>
<word>call</word>
</c:if>
<c:if test=”${fn:startsWith(‘class’, word)}”>
<word>class</word>
</c:if>
<c:if test=”${fn:startsWith(‘card’, word)}”>
<word>card</word>
</c:if>
<c:if test=”${fn:startsWith(‘dacnomania’, word)}”>
<word>dacnomania</word>
</c:if>
<c:if test=”${fn:startsWith(‘document’, word)}”>
<word>document</word>
</c:if>
</words>
就是一个xml格式的文档,通过使用jstl表达式,用startsWith函数匹配,如果通过就显得在xml内容中,还有看到上面的contentType=”text/xml; charset=UTF-8″了没有,是text/xml哦!这点要注意,如果不设置有的浏览器就不能解析了。
作者:hoojo
blog:http://blog.csdn.net/IBM_hoojo










