in reply to Building XML::Parser and getting it wrong everytime

but the problem is I am unable to parse external DTD :(

Show your code.

  • Comment on Re: Building XML::Parser and getting it wrong everytime

Replies are listed 'Best First'.
Re^2: Building XML::Parser and getting it wrong everytime
by syphilis (Archbishop) on Sep 04, 2009 at 07:58 UTC
    Show your code

    And show the errors, too.

    Cheers,
    Rob
      error in processing external entity reference at line 2, column 59, by +te 82: <?xml version="1.0" ?> <!DOCTYPE group SYSTEM "/opt/hpcmgr/etc/templates/cmgr.dtd"> ==========================================================^ <!-- name - name of the variable (required) at /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/XML/P +arser.pm line 187 at /opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/XML/P +arser.pm line 238 XML::Parser::parsefile('XML::Parser=HASH(0x40363a48)', '/opt/h +psrp/etc/templates/srpdefaults.cst') called at /opt/perl_32/lib/site_ +perl/5.8.8/XML/XPath/XMLParser.pm line 72 XML::XPath::XMLParser::parse('XML::XPath::XMLParser=HASH(0x406 +0ad48)') called at /opt/perl_32/lib/site_perl/5.8.8/XML/XPath.pm line + 77 XML::XPath::find('XML::XPath=HASH(0x4044688c)', '//var[@name=" +DefaultService"]') called at /opt/hpsrp/bin/srp_setup line 106 main::sysTemplateUpdate() called at /opt/hpsrp/bin/srp_setup l +ine 753 main::main() called at /opt/hpsrp/bin/srp_setup line 765 IO::Handle::DESTROY(/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi +/IO/Handle.pm:328): 328: sub DESTROY {}

      Posted above is the Error

      The scenario, the XML-File is "/opt/hpsrp/etc/templates/srpdefaults.cst" and "/opt/hpcmgr/etc/templates/cmgr.dtd" is the external DTD file.

        And your code is?
Re^2: Building XML::Parser and getting it wrong everytime
by Anonymous Monk on Sep 04, 2009 at 09:22 UTC

    The Code Works fine, i used an older 5.8.8 perl-release on HPUX (which had XML-Parser, prebuilt - it worked perfectly), but as i tried building and installing expat and XML-Parser in the new-release, i am hitting upon this.

    I had done the following Triaging

    1. Tared the XML-Parser module from the release that worked and untared it on the new one - The Parsing worked

    2. Copied over *ONLY* the "Expat.so" file, from "/opt/perl_32/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/XML/Parser/Expat/Expat.so" and replaced it on the NEW-Release -- The Parsing Worked

    3. The Issue is therefore with "Expat.so", that i had built. The XML-Parser module generates the Expat.so, which in turn uses the expat-library.

    I had built and installed both the expat-library and XML-Parser Module, i am not sure where i am going wrong or missing anything

    You could help me if i am ale to built the expat-library or XML-Module right, to get the external-DTD parsed