vinitns has asked for the wisdom of the Perl Monks concerning the following question:

Hi I am new to Perl and was wondering if there is any module in Perl to manipulate the XML representation of a .NET Dataset. Please do let me know. Thanks, Vinit

Replies are listed 'Best First'.
Re: Perl Module for .NET Dataset
by jeffa (Bishop) on Nov 02, 2005 at 19:44 UTC

    As long as the XML is indeed valid XML, then you have a whole slew of modules to choose from: XML

    I Google'd for such XML and came up with the following code that uses XML::Simple

    use strict; use warnings; use Data::Dumper; use XML::Simple; my $xml = XMLin(\*DATA); print Dumper $xml; __DATA__ <BarGraph xmlns="http://example.org/bargraph"> <Bar> <Title>Portland</Title> <Value>32</Value> </Bar> <Bar> <Title>Berlin</Title> <Value>20</Value> </Bar> <Bar> <Title>Pune</Title> <Value>16</Value> </Bar> </BarGraph>
    Hope this helps, feel free to ammend your question with any specifics. :)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: Perl Module for .NET Dataset
by jZed (Prior) on Nov 02, 2005 at 22:46 UTC
    If you want to treat the data like a database (i.e. access and/or modify it with DBI and SQL), the DBD::AnyData module can work with a number of XML formats and may be able to work directly with what you've got, I'd have to see some sample data to know for sure though.