Test results for Win32 Console

test_010101_example_ping_2

Test description

Test for correct functionality of the examples used in the xmlfy documentation.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.dtd

Input data

PING 169.254.1.1 (169.254.1.1) 56(84) bytes of data.

--- 169.254.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3000ms

Schema

<!ELEMENT netstat (info), (ping+), (summary_title), (summary_packets), (summary_times)>
<!ELEMENT info (p, host, ip, size, size_unit, p*)>
<!ELEMENT ping (size, size_unit, p, host, ip, seq, ttl, time, time_unit)>
<!ELEMENT summary_title (p, host, p+)>
<!ELEMENT summary_packets (transmitted, p, p, received, p, loss, p+, time)>
<!ELEMENT summary_times (type, titles, p, values, p+)>
<!ELEMENT p (#PCDATA)>
<!ELEMENT host (#PCDATA)>
<!ELEMENT ip (#PCDATA)>
<!ELEMENT size (#PCDATA)>
<!ELEMENT size_unit (#PCDATA)>
<!ELEMENT seq (#PCDATA)>
<!ELEMENT ttl (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT time_unit (#PCDATA)>
<!ELEMENT transmitted (#PCDATA)>
<!ELEMENT received (#PCDATA)>
<!ELEMENT loss (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT titles (#PCDATA)>
<!ELEMENT values (#PCDATA)>

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE netstat SYSTEM "schema.dtd">
<netstat>
  <info>
    <p>PING</p>
    <host>169.254.1.1</host>
    <ip>(169.254.1.1)</ip>
    <size>56(84)</size>
    <size_unit>bytes</size_unit>
    <p>of</p>
    <p>data.</p>
  </info>
  <summary_title>
    <p>---</p>
    <host>169.254.1.1</host>
    <p>ping</p>
    <p>statistics</p>
    <p>---</p>
  </summary_title>
  <summary_packets>
    <transmitted>4</transmitted>
    <p>packets</p>
    <p>transmitted,</p>
    <received>0</received>
    <p>received,</p>
    <loss>100%</loss>
    <p>packet</p>
    <p>loss,</p>
    <p>time</p>
    <time>3000ms</time>
  </summary_packets>
</netstat>

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