What's the easiest way to extract the following data from an xml file to say an array or class object in perl? I just need an example and which xml parse module(s) to use
<valuelist>time|totalTime|serviceLevel|resultString|oidNames[RAW_IN|RA +W_OUT]</valuelist> <unitlist>EpocTime|Seconds|SLAValue|String|RAW|RAW</unitlist> <datalogelement>1107388992|0.00251|1|Default status|2526997135|3422452 +313</datalogelement> <datalogelement>1107389291|0.00224|1|Default status|2535521338|3423007 +889</datalogelement> <datalogelement>1107389591|0.00307|1|Default status|2550911024|3423745 +020</datalogelement> <datalogelement>1107389891|0.00241|1|Default status|2566162886|3424888 +956</datalogelement> <datalogelement>1107390192|0.00236|1|Default status|2584817445|3425778 +169</datalogelement> <datalogelement>1107390492|0.00243|1|Default status|2603853482|3426485 +628</datalogelement> <datalogelement>1107390791|0.00229|1|Default status|2618185706|3427581 +317</datalogelement> <datalogelement>1107391092|0.00235|1|Default status|2632878576|3427950 +009</datalogelement> <datalogelement>1107391392|0.00234|1|Default status|2649691605|3428363 +809</datalogelement> <datalogelement>1107391692|0.00252|1|Default status|2659540151|3428595 +498</datalogelement> <datalogelement>1107391991|0.00235|1|Default status|2666344985|3429129 +946</datalogelement> <datalogelement>1107392292|0.00234|1|Default status|2668397109|3429603 +634</datalogelement>

In reply to extracting xml info by bengmau

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.