Thanks Trevor! (Also Ken). That seems to work very well.

The particular problem I was trying to solve was how to serialize arrays with arbitrary keys and contents, such that they can be shared across networks and platforms. I think I've found a solution for my purposes, (though it won't be reliable with binary data), and it involves building the xml without the xml library, and then using the library to unserialize - though it fails if there is any "<?xml..." header at all!

Best,

Mark

On 10 Nov 2008, at 14:33, Trevor DeVore wrote:

On Nov 9, 2008, at 11:50 AM, Mark Smith wrote:

So, finally, is there a way to encode xml documents as UTF-8 (or whatever) without having to encode each part myself, and add the encoding attribute to the header myself?

Mark,

Have you tried creating your XML tree with the encoding included?

put format("<?xml version=\"1.0\" encoding=\"UTF-8\"? ><whatshappening></whatshappening>") into tXml
put revCreateXmlTree(tXml, true, true, false) into tTree
put revXmlRootNode(tTree) into tNode

I've done this in the past and then I pass UTF-8 encoded strings to the revXML handlers.

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to