Writing a dictionary as XML?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Writing a dictionary as XML?

philippeback
How can I write a dictionary (OrderPreservingDictionary) as an XML string?

XMLWriter is more like a step by step thing.

TIA
Phil
Reply | Threaded
Open this post in threaded view
|

Re: Writing a dictionary as XML?

monty-3

 

xml :=
    XMLWriter writeWith: [:writer |
        dict keysAndValuesDo: [:key :value |
            writer
                tag: key
                with: value]]
 

Sent: Wednesday, February 17, 2016 at 12:46 PM
From: "[hidden email]" <[hidden email]>
To: "Any question about pharo is welcome" <[hidden email]>
Subject: [Pharo-users] Writing a dictionary as XML?

How can I write a dictionary (OrderPreservingDictionary) as an XML string?
 
XMLWriter is more like a step by step thing.
 
TIA
Phil