Test results for Solaris x86

test_001706_option_unxml_quoted

Test description

Test for the conversion to normal text of a XML input stream
that contains commas in the data into CSV format.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -U -F2 , -F3 ", " -q

Input data

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmlfy SYSTEM "xmlfy.dtd">
<xmlfy>
  <line>
    <field>admin</field>
    <field>use_crypt</field>
    <field>500</field>
    <field_emptyelement/>
    <field>544</field>
    <!-- BOFH --> <field>Administrator, 5555555, Dungeon</field>
    <field>/home/admin</field>
    <field>/bin/bash</field>
  </line>
  <!-- old <line>
    <field>Ro</field>
    <field>use_crypt</field>
    <field>211</field>
    <field>544</field>
    <field>Ro</field>
    <field>/export/home/Ro</field>
    <field_emptyelement />
    <field>/bin/sh</field>
  </line>
</xmlfy -->
  <line_emptyelement/>
  <line>
    <field>Ro</field>
    <field></field>
    <field_emptyelement
        rec="3"
        type="emptyelement" subtype="none"
        field="three" 
    />
    <field>649</field>
    <field>544</field>
    <field>Ro, 87654321, 8th floor</field>
    <field>/home/Ro</field>
    <field>/bin/bash</field>
  </line>
</xmlfy>
this line is orphaned data
<xmlfy>
  <line>
    <field>al0</field>
    <field>*</field>
    <field>650</field>
    <field>777</field>
    <field><name>Another Level 0</name><ph>12345678</ph><loc>6th floor</loc></field>
    <field>/home/al0</field>
    <field>/bin/sh</field>
  </line>
  <line_emptyelement abc="def" />
</xmlfy>

Output result

"admin","use_crypt","500","544","Administrator, 5555555, Dungeon","/home/admin","/bin/bash"
"Ro","","649","544","Ro, 87654321, 8th floor","/home/Ro","/bin/bash"
"al0","*","650","777","Another Level 0, 12345678, 6th floor","/home/al0","/bin/sh"

Goto:   Top of page.   Section "Environment".   Section "Summary".   Section "Test cases".