tags:

views:

52

answers:

1

Hi, I need to read the XML from the file. I use following code:

<ItemGroup>
<SourceXsltFile Include="SourceFile.xml" />
</ItemGroup>

<ReadLinesFromFile File="@(SourceXsltFile)">
  <Output TaskParameter="Lines" ItemName="FileContents" />
</ReadLinesFromFile>

But I need only the part of the file's content to be copied which resides inside the <XSL> tag.

Any ideas?

A: 
  • http://msbuildtasks.tigris.org/ - use RegexMatch task with something like - <XSL\b[^>]*>(.*?)</XSL> (not sure about exact correctness though).

  • Write your own custom task

Andrei Taptunov