Hello your code works fine but when using my real XML-file somethings goes wrong.
<exec> <dut frimware="4.40.1" ipaddress="171.0.0.234" macaddress="00408C727 +B40" model="AXIS 207W" /> <tc id="001.001" objective="The objective of this test case is to ve +rify that it is possible to upgrade the DUT's firmware by uploading a + firmware image file to the DUT using ftp when the DUT is connected t +o a network with 100 Mbit/s speed and that the DUT meet the PRS requi +rement." result="Passed" time="1201248021" version="0.01"> <ts id="001.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248021" /> <ts id="001.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248031" /> </tc> <tc id="002.001" objective="The objective is to verify that the DUT +can handle the maximum number of events for at least a week" result=" +Failed" time="1201248031" version="0.01"> <ts id="002.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248031" /> <ts id="002.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248041" /> </tc> <tc id="004.001" objective="The objective is to verify that the HTTP + traffic is marked correctly" result="Passed" time="1201248041" versi +on="0.01"> <ts id="004.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248041" /> <ts id="004.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248051" /> </tc> <tc id="005.001" objective="Verify that the CA certificate can be up +loaded" result="Passed" time="1201248051" version="0.01"> <ts id="005.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248051" /> <ts id="005.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248061" /> </tc> <tc id="006.001" objective="Verify that the DUT can be configured wi +th the Axis Setup Tool to connect to a wireless network" result="Fail +ed" time="1201248061" version="0.01"> <ts id="006.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248061" /> <ts id="006.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248071" /> </tc> <tc id="007.001" objective="The objective of this test case is to ve +rify that the DUT is compatible with Axis IP utility" result="Passed" + time="1201248071" version="0.01"> <ts id="007.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248071" /> <ts id="007.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248081" /> </tc> <tc id="008.001" objective="The objective of this test case is to ve +rify that the DUT can send live image and that all the links are corr +ect" result="Passed" time="1201248081" version="0.01"> <ts id="008.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248081" /> <ts id="008.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248091" /> </tc> <tc id="009.001" objective="Verify that it is possible to install th +e AXIS Media Control Embedded (AMC Embedded) on a computer where it h +as never been installed before" result="Passed" time="1201248091" ver +sion="0.01"> <ts id="009.001.001" description="log in using FTP" expected_resul +t="login granted" result="Passed" time="1201248091" /> <ts id="009.001.002" description="start upload" expected_result="u +pload finished" result="Passed" time="1201248101" /> </tc> </exec>

In reply to Re^2: XML::Simple parse attributes by hakana
in thread XML::Simple parse attributes by hakana

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.