Skip to content

Conversation

@marianopeck
Copy link
Contributor

I have kindly asked Martin if he could implement that.

Below is his original answer to me:

=========
This should work (same test results as before), though the character and string formats have changed a little, so you might not be able to read existing serialized objects. The old format Dale chose for encoding non-byte chars violated the XML spec. And I removed the #encodeAsUTF8 stuff. This needs to be done at the entity level (ie, document-wide), not at the element level.

SIXX should now handle decoding automatically when reading, but don't use encodings other than UTF-8, since SIXX generates xml declarations with 'encoding="utf-8"' attributes.

To encode SIXX output, you need to wrap the write stream you're using with an XMLEncodingWriteStreamAdapter and a XMLStreamConverter. The latest XMLParser has an #encodingOn: convenience method for this:

    (XMLUTF8StreamConverter encodingOn: stream). "returns a wrapped stream"

same thing:

    ('utf-8' asXMLStreamConverter encodingOn: stream).

GsFiles are supported too.

Update the ConfigurationOf to depend on #stable smalltalkhub.com PharoExtras/XMLParser.

========

I very much agree with what he did. And even if it might break materialization of existing files, I believe its totally worth. Until now, SIXX was using an INCREDIBLE OLD GemStone-specific XMLSupport package that nobody maintained. XML has evolved other the years and Pharo code is a million years ahead. With these changes, SIXX can now use the Pharo's up to date XMLParser, which is super cool.

dalehenrich added a commit that referenced this pull request Sep 23, 2020
patch a compile error and update to use smalltalkCI for travis ... expected set of failures to be addressed when work on PR #4 resumes ... shortly?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants