Test results for Win32 Console |
Test for restarting scopes on user specified level 1 and level 2 delimiters creating level 1 and level 2 elements from the input stream that are constrained by these restarting scopes. The 1st and 3rd occurrences of the specified level 1 delimiter are outside the scope and should therefore be treated as data. After the 4th occurrence of the specified level 1 delimiter is processed, the scope should restart and this process repeat itself until the input is exhausted. Within the framework of its parent element, the 1st occurrence of the specified level 2 delimiter is outside the scope and should therefore be treated as data. After the 2nd occurrence of the specified level 2 delimiter is processed, or if the parent element closes, the scope should restart and this process repeat itself until the input is exhausted.
Pass
cat _INPUT_DATA_ ¦ xmlfy -F1:2,4r : -F2:2r , -t
1:2:3:4:5a,5b,5c:6:7:8:8.5:9a,9b,9c,9d,9e:1:2:3:4:5a,5b,5c:6:7:8:8.5:9a,9b,9c,9d,9e
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xmlfy SYSTEM "xmlfy.dtd"> <xmlfy> <line> <field>1:2</field> </line> <line> <field>3:4</field> </line> <line> <field>5a,5b</field> <field>5c:6</field> </line> <line> <field>7:8</field> </line> <line> <field>8.5:9a,9b</field> <field>9c,9d</field> <field>9e</field> </line> <line> <field>1:2</field> </line> <line> <field>3:4</field> </line> <line> <field>5a,5b</field> <field>5c:6</field> </line> <line> <field>7:8</field> </line> <line> <field>8.5:9a,9b</field> <field>9c,9d</field> <field>9e</field> </line> </xmlfy>