I've got a XML-document with this content:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="/Stylesheet.xsl" ?>
How can I find out using ANT's <xmltask>
whether the <?xml-stylesheet ?>
node already exists?
That's a special node type called processing instruction. You can query it using XPath to find out if it exists and what its attributes are:
/processing-instruction('xml-stylesheet')