home.social

#xmllib — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #xmllib, aggregated by home.social.

fetched live
  1. Any experienced Perl folks out there using XML::LibXML vs XML::Simple?

    I'm trying to move to LibXML like a good modern xml munger.

    I'm using the XML weather data file here: alberniweather.ca/ECXMLfileInl

    I've been getting the keys and entries from the XML file by loading it with:
    my $data = $xml->XMLin($xmlFile);
    which creates an array that I can move through etc.

    but with LibXML using:
    my $dom = XML::LibXML->load_xml(location => $xmlFile);

    $dom ends up being a string rather than an array of XML stuff and I can't reference the various nodes etc.

    wwwhhhhyyyy?

    #help #askMastodon #perl #XML #XMLLib #XMLSimple