Test results for Solaris x86 |
Test for field numbers being suffixed at the end of level 2 element names starting at number 1 and increasing sequentially with every level 2 element encountered within the same parent element, otherwise resetting back to 1.
Pass
cat _INPUT_DATA_ ¦ xmlfy -f
Team Won Lost Drawn Barcelona 5 1 2 Manchester 4 2 2 Milan 2 2 4
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xmlfy SYSTEM "xmlfy.dtd"> <xmlfy> <line> <field1>Team</field1> <field2>Won</field2> <field3>Lost</field3> <field4>Drawn</field4> </line> <line> <field1>Barcelona</field1> <field2>5</field2> <field3>1</field3> <field4>2</field4> </line> <line> <field1>Manchester</field1> <field2>4</field2> <field3>2</field3> <field4>2</field4> </line> <line> <field1>Milan</field1> <field2>2</field2> <field3>2</field3> <field4>4</field4> </line> </xmlfy>