I have a plain text file structured like this:
!ITEM_NAME
Item value
!ANOTHER_ITEM
Its value
...
Is it possible to get with XSLT a file sim
This XSLT 2.0 transformation:
when appliedon any XML document (not used) and having the provided text residing in the local file C:\temp\delete\Text.txt
:
!ITEM_NAME
Item value
!ANOTHER_ITEM
Its value
...
produces the wanted, correct result:
Item value
Its value
...
To test more completely, we put this text in the file:
As is text
!ITEM_NAME
Item value
!ANOTHER_ITEM
Its value
As is text2
!TEST_BANG
Here's a value with !bangs!!!
!TEST2_BANG
!!!Here's a value with !more~ !bangs!!!
As is text3
The transformation again produces the wanted, correct result:
As is text
Item value
Its value
As is text2
Here's a value with !bangs!!!
!!!Here's a value with !more~ !bangs!!!
As is text3