[XML-SIG] Q: minidom and iso-8859-1
uche.ogbuji@fourthought.com
uche.ogbuji@fourthought.com
Wed, 13 Sep 2000 14:00:09 -0600
> How do you get the original encoding of the document.
>
> It appears that the DOM itself does not provide any mechanism for
> that. It may be that the reader passes this information to the DOM
> builder, so you may need to hook into the parser. However, it also
> appears that SAX does not generate an event for the <?xml header, so
> you could only use a specific parser with some extended interface.
SAX2 does, and 4DOM translates it to a processing instruction (this should
raise some eyebrows since the XML declaration is not a processing instruction,
but we've checked: DOM seems to allow this and som of the gurus on the DOM
lust have said it's not incorrect to do so.)
The problem, of course, is that the migration of PyXML to sax2 is not yet
complete so there's no easy way to get this info right now.
It's too bad that we're all so terribly busy in xml-sig, because we really
should be sorting such things out, but barring a UN declaration of an
additional four hours per day, it might be a while before we can get it all
done.
--
Uche Ogbuji Principal Consultant
uche.ogbuji@fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python