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 version="1.0" encoding="UTF-8" standalone="no"?> <?xml-stylesheet type="text/xsl" href="/Stylesheet.xsl" ?>
如何使用 ANT 找出节点<xmltask>是否<?xml-stylesheet ?>已经存在?
<xmltask>
<?xml-stylesheet ?>
那是一种特殊的节点类型,称为处理指令。您可以使用XPath查询它以了解它是否存在以及它的属性是什么:
/processing-instruction('xml-stylesheet')