[Bangalore-pm] XML to PERL

promit promitbhattacharya at gmail.com
Fri Nov 8 03:11:30 PST 2013


just use XML::Simple

it will read it into a perl reference and then say something like
$ref->{IDs}->{Child1}


On Fri, Nov 8, 2013 at 4:30 PM, Satya.. <satya.itguy at gmail.com> wrote:

> Hi All,
>
> We are having one small XML file which has below format
>
> <IDs>
> <*child1*>
>  <Group>group1</Group>
>  <Code>code1</Code>
>  <Division>division1</Division>
>  <Department></Department>
>  <Class>1512</PSA>
> </*child1*>
> <*child2*>
>  <Group>Group2</Group>
>  <Code>Code2</Code>
>  <Division></Division>
>  <Department></Department>
>  <Class>1010, 1015, 1020</PSA>
> </*child2*>
> ---
> ---
> ---
> </IDs>
>
>
> I need to write a perl script to capture the values into variables
>
> I got confused how to handle different childs in Perl .. Child1..Child2
>
> Any sample perl script will be helpful to me
>
>
> -------------------------------------------
>
> Regards, J
> *$@tya..*
>
>
> _______________________________________________
> Bangalore-pm mailing list
> Bangalore-pm at pm.org
> http://mail.pm.org/mailman/listinfo/bangalore-pm
>



-- 
~ Sent from a plain old fashioned device called a komputarrrr ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/bangalore-pm/attachments/20131108/84eda090/attachment.html>


More information about the Bangalore-pm mailing list