Link to home
Start Free TrialLog in
Avatar of Amkick
AmkickFlag for Netherlands

asked on

unrecognized input signature using MSXML2 on an otherwise fine XML document

Hi there,

I am using ActiveState Perl and Win32::OLE->new('Msxml2.DOMDocument.6.0') along with an xml file. I want to read the contents into an object, which normally works fine, but for some xml files I get 'unrecognized input signature'. Yet these files work fine with say Altova XmlSpy.

Some browsing on the web leads me to assume that the message hints that not all characters in the file are utf-8. And I assume that MSXML2 is more sensative to this than for instance XmlSpy.

Can anyone confirm my assumptions? And of course: can anyone suggest how to handle these xml files, so that I can read them properly into MSXML2? Or maybe: how can I detect the characters that cause the issue?
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Amkick

ASKER

It turned out to be some coding that went bad and produced whitespace before the <?xml declaration. Simple, but so hard to find if you don't know where to look. Thanks for the advice. It is great to know what 'unrecognized input signature' actually means.