Sample input:
<document>
<filename>Admin Training Manual.pdf</filename>
<type>0</type>
</document>
<document>
<filename>Document Manual.pdf</filename>
<type>0</type>
</document>
Condition: If the filename is = Admin Training Manual, change the type to 1.
Output:
<document>
<filename>Admin Training Manual.pdf</filename>
<type>1</type>
</document>
<document>
<filename>Document Manual.pdf</filename>
<type>0</type>
</document>
I have tried everything on my disposal and cant find any answer.
I have not yet attempted but the concept is there:
if header = <document> (
loop to count line inside <document>
if line is equal to 1
then check the string
if match
then replace line 2 with 1.
)