The XmlNodeExists Task will check if a node exists in an xml document based on an XPath query.

Example Usage:
  <XmlNodeExists XmlFile="$(MSBuildProjectDirectory)\$(OutputPath)Test.xml"
      XPath="/Project/Output">
    <Output PropertyName="OutputNodeExists" TaskParameter="Exists" />
  </XmlNodeExists>
  <Message Text="Output node exists = $(OutputNodeExists)" />


Attribute Description Required Type Direction
Name The name of the node N/A String Output
NamespaceURI The namespace URI for the node False String Input
Prefix The namespace prefix for the node False String Input
XmlFile The path and file name of the xml document True String Input
XPath The XPath that is used to check if a node exists. True String Input
Exists An indicator if the node that was checked exists in the xml document N/A Boolean Output

Last edited Feb 17, 2007 at 6:09 AM by camalot, version 2

Comments

No comments yet.