[Mono-list] Re: Small patch for SoapFormatter
Fri, 24 Jan 2003 21:34:45 -0600
I will consider it. The problem is that only the namespace attribute is a
URI, not other attributes. I think I would just format the namespace to be
the URI formatted string.
[mailto:email@example.com]On Behalf Of
Sent: Friday, January 24, 2003 9:18 PM
To: Mike Lipkie
Subject: [Mono-list] Re: Small patch for SoapFormatter
> 4) I also have not looked into the XMLTextWriter but will it update the
> attributes and replace escape characters in the string (i.e. space with
> %20%)? If not, shoudl this be hard coded in the generation or added to
Replacing whitespaces with %20 is specific to URIs and it shouldn't be
done by XmlTextWriter itself.
I don't know SOAP well, sorry if I'm missing some points. However,
You might have already considered, you can create XmlSoapWriter that
overrides XmlWriter (as a decorator). For example:
public class XmlSoapWriter : XmlWriter
public XmlWriter writer;
public XmlSoapWriter (XmlWriter w)
this.writer = w;
// It is invoked to write attribute value (and in several cases).
public override bool WriteString (string value)
writer.WriteString (NodeType == XmlNodeType.Attribute ?
value.Replace (" ", "%20") : value);
... with wrapping other abstract methods 'writer.XXXmethods(XXXargs)'
-- Atsushi Eno
Mono-list maillist - Monofirstname.lastname@example.org