Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

SOAP / xmlrpx / DOM - encoding
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

Report this thread to moderator Post Follow-up to this message
Old Post
Matthias Meier
04-21-05 01:58 PM


Re: SOAP / xmlrpx / DOM - encoding
Matthias 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

Report this thread to moderator Post Follow-up to this message
Old Post
Michael Schlenker
04-21-05 01:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:23 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.