XML格式输出
- 2020-08-13 09:05:30
- 陈琦
- 6283
- 最后编辑:陈琦 于 2021-04-25 11:01:37
- 分享链接
通过指定-o参数的文件扩展名为xml,我们可以输出XML 格式的数据 文件 。
zd.exe -d demo\default.yaml -c demo\test.yaml -n 3 -o demo\output\default.xml
生成的XML内容如下:
<?xml version="1.0" encoding="UTF-8"?> <testdata> <title>Test Data</title> <row> <field_common>int_1 </field_common> <field_use_excel> [济南市]</field_use_excel> <field_file>carl </field_file> <field_repeat>user-1 </field_repeat> <field_format>passwd01 </field_format> <field_nested_range>['101']</field_nested_range> <field_random>10 </field_random> <field_loop>[a_b_c]</field_loop> <field_use_instance>192.168.0.1]</field_use_instance> <field_nested_instant>[10.0.0.1/'8'}</field_nested_instant> <field_loop_range>[1|1] </field_loop_range> <field_step>1 </field_step> <field_use_another_file>'100,101' </field_use_another_file> <field_use_ranges>'101' </field_use_ranges> <field_with_children> [part1_a|part2_A|part3_int_10] </field_with_children> </row> <row> <field_with_children> [part1_b|part2_B|part3_int_11] </field_with_children> <field_common>int_2 </field_common> <field_step>3 </field_step> <field_file>carl </field_file> <field_repeat>user-1 </field_repeat> <field_format>passwd02 </field_format> <field_use_ranges>'102' </field_use_ranges> <field_use_instance>192.168.1.2]</field_use_instance> <field_use_excel> [青岛市]</field_use_excel> <field_nested_instant>[10.1.1.2/'16'}</field_nested_instant> <field_random>4 </field_random> <field_loop>[d_e_f]</field_loop> <field_use_another_file>'102,103' </field_use_another_file> <field_loop_range>[1|2|2] </field_loop_range> <field_nested_range>['102']</field_nested_range> </row> <row> <field_step>5 </field_step> <field_loop>[g_h_i]</field_loop> <field_use_ranges>'103' </field_use_ranges> <field_loop_range>[2|3] </field_loop_range> <field_common>int_3 </field_common> <field_use_another_file>'104,105' </field_use_another_file> <field_file>carl </field_file> <field_format>passwd03 </field_format> <field_use_instance>192.168.2.3]</field_use_instance> <field_use_excel> [淄博市]</field_use_excel> <field_with_children> [part1_c|part2_C|part3_int_12] </field_with_children> <field_nested_range>['103']</field_nested_range> <field_random>1 </field_random> <field_nested_instant>[10.2.2.3/'24'}</field_nested_instant> <field_repeat>user-1 </field_repeat> </row> </testdata>
发表评论