471,570 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

xml serialization for white space code

hey, anybody help me.
my problem is that i am doing xml seriazation through top most class.
so many place i need indentation. so what i did i put hexadecimal
code(   )

class sample
{
private string _title;
public string Title
{
get
{
return _title;
}
set
{
_title=value;
}
}
}

i assign Title = "   Book Shop Inventory";

but in time of serialization i am getting like that.
<Title>"&amp;#xA0;&amp;#xA0;&amp;#xA0;Book Shop Inventory</Title>
how i can overcome of this problem. is there any other way to get white
space. if pdf generation.
if i am simpley ptting a empty space then also i am getting same after
xml serialization.
but converting it into pdf. simply this empty space is not coming. so
what can i do.

Title = " Book Shop Inventory";

<Title> Book Shop Inventory</Title>

thanks in advance

Jan 11 '06 #1
1 2333
virendra.chandra wrote:
hey, anybody help me.
my problem is that i am doing xml seriazation through top most class.
so many place i need indentation. so what i did i put hexadecimal
code(&#xA0;&#xA0;&#xA0;)


<snip>

It's not entirely obvious what you're doing, or where the problem is.
Could you write a short but complete program the demonstrates the
problem? I suspect you just need to have a class to serialize, and a
main program which sets some properties, serializes, deserializes, and
then displays the properties.

See http://www.pobox.com/~skeet/csharp/complete.html for more
information on what I'm after.

Jon

Jan 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Grumble | last post: by
2 posts views Thread by Malcolm Dew-Jones | last post: by
17 posts views Thread by Stanimir Stamenkov | last post: by
reply views Thread by Mark Moore | last post: by
5 posts views Thread by Michael Shell | last post: by
2 posts views Thread by Carlo, MCP | last post: by
2 posts views Thread by shagy | last post: by
12 posts views Thread by =?Utf-8?B?enRSb24=?= | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.