pharo-contributions / XML-XMLParser

XML Parser for Pharo
MIT License
11 stars 17 forks source link

`XMLHTTPException: (MessageNotUnderstood) Message not understood: ZnLimitedReadStream >> #binary` encountered while executing `(XMLDOMParser parseURL: 'https://www.w3schools.com/xml/simple.xml') inspect`in Pharo 10 #11

Closed capsulecorplab closed 1 year ago

capsulecorplab commented 2 years ago

Screenshot from 2022-10-01 15-32-57

JanBliznicenko commented 1 year ago

It seems creating following method in ZnLimitedReadStream makes XMLParser to work in Pharo 10+:

binary
    stream binary

It could be added as an extension method, but I am not sure if I should create PR, as I do not understand ZnLimitedReadStream nor XMLParser enough to find any possible consequences.

@astares?

astares commented 1 year ago

One can provoke the issue using

(XMLDOMParser parseURL: 'https://www.w3schools.com/xml/simple.xml') inspect

(here in Pharo 11) and the stream is already a binary one when checking with #isBinary as it returns true.

So simply removing the #binary send should solve the issue.