Professional Web Applications Themes

could not find PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX;also need some advice about XML parsing modules on CPAN - PERL Beginners

Hi; I have a Fedora Core 2 full install to which I installedXML::Simple manually (ie: download, extract, perl Makefile.PL, make, make test, sudo make install). Some of the tests did not run since I did not have Tie::IxHash (?) installed. The error message (could not find PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX) is received when I try to run the enclosed perl program using the enclosed data file. I also have enclosed the output. Should I install Tie::IxHash? I would like to have my XML output (after values are updated) formatted the same way my XML input was formatted. Will that help? Do ...

  1. #1

    Default could not find PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX;also need some advice about XML parsing modules on CPAN

    Hi;

    I have a Fedora Core 2 full install to which I installedXML::Simple
    manually (ie: download, extract, perl Makefile.PL, make, make test, sudo
    make install). Some of the tests did not run since I did not have
    Tie::IxHash (?) installed. The error message (could not find
    PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX) is
    received when I try to run the enclosed perl program using the enclosed
    data file. I also have enclosed the output.

    Should I install Tie::IxHash? I would like to have my XML output (after
    values are updated) formatted the same way my XML input was formatted.
    Will that help?

    Do I need to upgrade *XML::SAX*
    <http://search.cpan.org/author/MSERGEANT/XML-SAX-0.12/SAX.pm>?

    Since I want the initial formatting to be retained (is this possible)
    and I want the XML output to pass strict XML checking, do I need to give
    up on XML::Simple, or did I miss some options that would give me these
    characteristics? I've been browsing about on CPAN for some while and
    there's quite a bit to research. I need to implement this quickly though...

    The expected size/complexity of the input XML is quite small and
    simple. I just need the ability to quickly and reliably examine and
    possibly change the values associated with a specified set of XML tags.
    I need to be able to a quickly add or remove XML tags from my list to
    examine/modify. It looked like XML::Simple fit the bill, but I see that
    the XML output that the closing XML tag is not strictly compliant (as
    "<tag1> value </tag1>" is "correct" while "<tag1> value </>" is not). I
    need to preserve the XML output in ClearCase that remains in a human
    "readable" form, ie: well-formatted...

    Thanks in advance for your comments and advice,

    Ken Wolcott

    *********************
    ?xml version="1.0" encoding="UTF-8"?>
    <index>
    <version>1.0.10.6</version>
    <type>acq</type>
    <maxhwversion>1</maxhwversion>
    <file>acq.img:b0e2699994df482d069d4e9d6e037abe</file>
    </index>
    *********************

    *********************
    #!/usr/bin/perl

    use strict;
    use warnings;
    use XML::Simple;
    use Data::Dumper;

    my $label = "XX"; # sanitized :-)
    my $version = substr ($label, 7, (length ($label) - 11));
    my $tag;
    my $changes = 0;
    my $xml_source = "index.xml";
    my $hashref = XMLin ($xml_source);

    print "contents of hash prior to modification:\n";
    print "#######################################\n";
    print Dumper ($hashref);
    print "#######################################\n";

    $tag = "version";
    if ($hashref -> {$tag} ne $version) {
    $hashref -> {$tag} = $version;
    $changes++;
    }

    if ($changes) {
    print "contents of hash after modification:\n";
    print "#######################################\n";
    print Dumper ($hashref);
    print "#######################################\n";
    }

    *********************

    **./xml_simple.pl
    could not find PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX
    contents of hash prior to modification:
    #######################################
    $VAR1 = {
    'version' => 'X',
    'file' => 'file:md5sum',
    'maxhwversion' => '1',
    'type' => 'acq'
    };
    #######################################
    contents of hash after modification:
    #######################################
    $VAR1 = {
    'version' => '',
    'file' => 'file:md5sum',
    'maxhwversion' => '1',
    'type' => 'acq'
    };
    #######################################
    <opt file="file:md5sum" maxhwversion="1" type="acq" version="" />
    *******************

    *********************
    perl -v

    This is perl, v5.8.3 built for i386-linux-thread-multi
    *********************

    Ken Guest

  2. #2

    Default Re: could not find PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX;also need some advice about XML parsing modules on CPAN

    Ken Wolcott wrote:
     
    I suppose it is in bad taste to reply to one's own posting, but I have
    an update.

    After reading some in the O'Reilly Perl & XML book, reading the email
    archives of this mailing list, several FAQS that some people mentioned
    from the mailing list archives and another reading of the CPAN man page
    for XML::Simple, I decided to try the OO interface, adding "ForceArray
    => 1, KeepRoot => 1, KeyAttr => 1" to my call to the pr. It seems
    now that the formatting is nice and the closing tag is specified
    properly. So, getting patient, calm, cool and collected rather than
    anxious solved part of the problem. Now the problem that remains is the
    error/warning message in the subject line: "could not find
    PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX" when
    using XML::Simple. What do I need to do to fix that?

    Thanks,
    Ken Wolcott

    Ken Guest

  3. #3

    Default Re: could not find PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX;also need some advice about XML parsing modules on CPAN

    Ken Wolcott wrote:
     

    Again, replying to my own post as nobody has reponded :-(

    I saw the "could not find PrDetails.ini in
    /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX" warning/error on a Fedora Core
    2 system, but did not see the error on three Red Hat 9 systems. So I
    punted by not using the Fedora system.

    Ken
    Ken Guest

  4. #4

    Default Re: could not find PrDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX; also need some advice about XML parsing modules on CPAN

    ANother observation is that i'm not finding any problem with this
    warning/err message. There are no side-effects. The XML:: pr
    is working correctly.

    regards
    -Ajey

    Quoting Ken Wolcott <ge.com>:
     
    >
    > Again, replying to my own post as nobody has reponded :-(
    >
    > I saw the "could not find PrDetails.ini in
    > /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX" warning/error on a Fedora Core
    > 2 system, but did not see the error on three Red Hat 9 systems. So I
    > punted by not using the Fedora system.
    >
    > Ken
    >
    > --
    > To unsubscribe, e-mail: org
    > For additional commands, e-mail: org
    > <http://learn.perl.org/> <http://learn.perl.org/first-response>
    >
    >
    >[/ref]


    ajey@pdx.edu Guest

Similar Threads

  1. Replies: 1
    Last Post: September 4th, 01:52 AM
  2. download all CPAN modules ?
    By ravi in forum PERL Modules
    Replies: 11
    Last Post: August 30th, 04:33 AM
  3. Question about CPAN modules
    By Babale in forum PERL Beginners
    Replies: 2
    Last Post: May 4th, 02:17 PM
  4. Installing Modules From CPAN
    By Dan Muey in forum PERL Beginners
    Replies: 6
    Last Post: December 23rd, 07:01 PM
  5. CPAN modules for Apache 2.0.XX
    By Randy Kobes in forum PERL Miscellaneous
    Replies: 0
    Last Post: July 8th, 02:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139