How to include xml:lang="x-none" while serialization

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to add xml:lang="x-none as attribute when serialize object as following

<langstring xml:lang="x-none">Simulation</langstring>

how can I do this?
 
Raed,

I don't believe you can do this with the XmlSerializer. You would have
to process the stream when it is done, and then insert the attribute
yourself.

Hope this helps.
 
The only way to get this functionality with the built in XmlSerializer
is to implement IXmlSerializable in the class that contains the
globalized string.

The downside is that you need to use custom code for the entire class,
not just for one attribute.

The interface isn't really documented but it only has three members.
Do a google groups search for more info.

Best regards,

Sam


I need to add xml:lang="x-none as attribute when serialize object as following

<langstring xml:lang="x-none">Simulation</langstring>

how can I do this?

B-Line is now hiring one Washington D.C. area VB.NET
developer for WinForms + WebServices position.
Seaking mid to senior level developer. For
information or to apply e-mail resume to
sam_blinex_com.
 
Back
Top