[Mono-list] Re: Small patch for SoapFormatter
Sat, 25 Jan 2003 12:17:55 +0900
> 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 t=
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 =3D w;
// It is invoked to write attribute value (and in several cases).
public override bool WriteString (string value)
writer.WriteString (NodeType =3D=3D XmlNodeType.Attribute ?
value.Replace (" ", "%20") : value);
=2E.. with wrapping other abstract methods 'writer.XXXmethods(XXXargs)'
-- Atsushi Eno