S
saket.raizada
In my XML file i have a heading like
<!DOCTYPE system_health SYSTEM
"file://C:\eclipse\XMLCodeV2\SystemHealth.dtd">
My program tries to check the XML file against DTD by doing a
my %expat_options = (KeepCDATA => 1,
Handlers => [ Unparsed => \&my_Unparsed_handler
],);
my $parser = new XML:OM::ValParser (%expat_options);
eval {
local $XML::Checker::FAIL = \&my_fail;
$doc = $parser->parsefile ("$xml_file");
};
When i run the program it says.
..
C:\eclipse\XMLCodeV2\SystemHealth.xml failed validation!
Couldn't find external DTD
[file://C:\eclipse\XMLCodeV2\SystemHealth.dtd], may
e you should set SGML_SEARCH_PATH at
PERL2EXE_STORAGE/XML/Checker/Parser.pm lin
383.
If i add the entry
$parser->set_sgml_search_path("C:\\eclipse\\XMLCodeV2");
to set the sgml path then it fails with error
C:\eclipse\XMLCodeV2\SystemHealth.xml failed validation!
Couldn't load URL [file:C:\eclipse\XMLCodeV2/SystemHealth.dtd] with
LWP: panic URI.pm line 92.
Anyone has an example how to load external DTD on Windows machine ?
<!DOCTYPE system_health SYSTEM
"file://C:\eclipse\XMLCodeV2\SystemHealth.dtd">
My program tries to check the XML file against DTD by doing a
my %expat_options = (KeepCDATA => 1,
Handlers => [ Unparsed => \&my_Unparsed_handler
],);
my $parser = new XML:OM::ValParser (%expat_options);
eval {
local $XML::Checker::FAIL = \&my_fail;
$doc = $parser->parsefile ("$xml_file");
};
When i run the program it says.
..
C:\eclipse\XMLCodeV2\SystemHealth.xml failed validation!
Couldn't find external DTD
[file://C:\eclipse\XMLCodeV2\SystemHealth.dtd], may
e you should set SGML_SEARCH_PATH at
PERL2EXE_STORAGE/XML/Checker/Parser.pm lin
383.
If i add the entry
$parser->set_sgml_search_path("C:\\eclipse\\XMLCodeV2");
to set the sgml path then it fails with error
C:\eclipse\XMLCodeV2\SystemHealth.xml failed validation!
Couldn't load URL [file:C:\eclipse\XMLCodeV2/SystemHealth.dtd] with
LWP: panic URI.pm line 92.
Anyone has an example how to load external DTD on Windows machine ?