Code Comments
Programming Forum and web based access to our favorite programming groups.Hello to all! I want to send data over network via tclsoap (xmlrpc) (Version 1.6.7, tcldom 3.0 tclxml 3.0) and want to have nonprintable and other non us-ascii characters converted to their xml-entity i.e.: ä => ä or ä If tclsoap receives an character-entity it is decoded to it's correct charac ter by 'dom::DOMImplementation parse' But for sending data, tclsoap uses 'dom::DOMImplementation serialize' and he re only few special chars are converted to their entity (i.E. '&' => amp;). Is it posible to configure 'dom::DOMImplementation serialize' that other non us-ascii/non printable characters are also converted? Here an example: package require dom set doc [dom::DOMImplementation create] set d_root [dom::document createElement $doc "root"] dom::document createTextNode $d_root "öäü&" dom::DOMImplementation serialize $doc Output is ------------------------------------ <?xml version='1.0'?> <!DOCTYPE root> <root>öäü&</root><?xml version='1.0'?> ------------------------------------ But I would like to have ------------------------------------ <?xml version='1.0'?> <!DOCTYPE root> <root>öäü&</root> ------------------------------------ Thanks for all ideas! Matthias -- ________________________________________ _______ Matthias Meier Fornoff und Heintzenberg GmbH Consulting, DV-Systeme, Dienstleistungen Hauptstr. 4, D-79224 Umkirch Tel +49 7665 937-0, Fax -150
Post Follow-up to this messageMatthias Meier wrote: > Hello to all! >=20 > I want to send data over network via tclsoap (xmlrpc) > (Version 1.6.7, tcldom 3.0 tclxml 3.0) and want to have > nonprintable and other non us-ascii characters converted to their=20 > xml-entity > i.e.: >=20 > =E4 =3D> ä or ä >=20 > If tclsoap receives an character-entity it is decoded to it's correct=20 > character by > 'dom::DOMImplementation parse' >=20 > But for sending data, tclsoap uses 'dom::DOMImplementation serialize'=20 > and here only few special > chars are converted to their entity (i.E. '&' =3D> amp;). >=20 > Is it posible to configure 'dom::DOMImplementation serialize' that othe= r=20 > non us-ascii/non printable > characters are also converted? It should not be needed as the default encoding for XML is utf-8, but if = you change the encoding of the XML, you may get the conversion you want. Michael
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.