Wenn i try to parse a Document that has a doctype declaration with the
saxparser i get the following message:
/Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/runner.rb:45:
(eval):95:in `parse': NULL pointer given (ArgumentError)
from (eval):95
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `eval'
from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/runner.rb:
45
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`require'
from ../../../script/runner:3
This is the document (inner contents removed)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ONIXmessage SYSTEM "http://www.editeur.org/onix/2.1/short/
onix-international.dtd">
<ONIXmessage release="2.1">
</ONIXmessage>
The parsing is successful if i use the XML::Parser instead of
SaxParser and set the following values:
XML::Parser.default_validity_checking = false
XML::Parser.default_load_external_dtd = false
XML::Parser.default_pedantic_parser = false
Is there a was to set these variables for the saxparser or resolve the
issue in another way?
as soon as i remove the doctype declaration the saxparsing succeeds.
TIA
Andy
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel