XmlRead Class

MSBuild

Reads a value from a XML document using a XPath.


Namespace: MSBuild.Community.Tasks
Assembly: MSBuild.Community.Tasks (in MSBuild.Community.Tasks.dll)

Syntax

Visual Basic (Declaration)
Public Class XmlRead
    Inherits Task
C#
public class XmlRead : Task
C++
ref class XmlRead : Task
J#
public class XmlRead extends Task
JScript
public class XmlRead extends Task

Example

Read all targest from a build project.

 Copy Code
            <XmlRead Prefix="n"
                Namespace="http://schemas.microsoft.com/developer/msbuild/2003" 
                XPath="/n:Project/n:Target/@Name"
                XmlFileName="Subversion.proj">
                <Output TaskParameter="Value" PropertyName="BuildTargets" />
            </XmlRead>
            <Message Text="Build Targets: $(BuildTargets)"/>
            

Remarks

If the XPath returns multiple nodes, the Value will be a semicolon delimited list of the nodes text.

Inheritance Hierarchy

System.Object
   Microsoft.Build.Utilities.Task
      MSBuild.Community.Tasks.XmlRead

Thread Safety

Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

See Also

Syntax based on .NET Framework version 2.0.
Documentation version 1.0.0.0.