encodingStyle usage in XmlSerializer.Serialize

Posted by Vishal Seth on Stack Overflow See other posts from Stack Overflow or by Vishal Seth
Published on 2010-04-20T19:00:12Z Indexed on 2010/04/20 19:03 UTC
Read the original article Hit count: 1886

Can somebody please explain the use of 4th parameter of

public void Serialize(
    XmlWriter xmlWriter,
    Object o,
    XmlSerializerNamespaces namespaces,
    string encodingStyle
)

My issue is this:

I've following string in one of the fields of my object:

"reviewed ?" // music notation

When I serialize it, it becomes

& # x E; // see it as one word, w/o spaces it won't let me type

And it fails when I try to transform this .NET generated XML through another XSL file

Is it happening because its serializing using UTF-16? Is there any way I can make it transform using UTF-8 and make this "error" go away?

**

© Stack Overflow or respective owner

Related posts about .NET

Related posts about xml-serialization