Test results for Linux

test_001221_option_attribute_insert

Test description

Test for elements with user specified attributes inserted at the level
specified. Also test for scope handling.

Test status

 Pass

Run command

  cat _INPUT_DATA_ ¦ xmlfy -A0 insert author "Arthur Gouros" -A1:2-$ insert league premier -A1:1 insert field "League Type" -A2:2r insert a b

Input data

Team Won Lost Drawn
Barcelona 5 1 2
Manchester 4 2 2
 
Milan 2 2 4

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmlfy SYSTEM "xmlfy.dtd">
<xmlfy author="Arthur Gouros">
  <line field="League Type">
    <field>Team</field>
    <field a="b">Won</field>
    <field>Lost</field>
    <field a="b">Drawn</field>
  </line>
  <line league="premier">
    <field>Barcelona</field>
    <field a="b">5</field>
    <field>1</field>
    <field a="b">2</field>
  </line>
  <line league="premier">
    <field>Manchester</field>
    <field a="b">4</field>
    <field>2</field>
    <field a="b">2</field>
  </line>
  <line league="premier">
    <field>Milan</field>
    <field a="b">2</field>
    <field>2</field>
    <field a="b">4</field>
  </line>
</xmlfy>

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