Click here to Skip to main content
15,663,632 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +

I have passed an string from my web service to my xaml page which contains xml of data.

xml which is received in xaml page doesnot contain empty tags.

For some reason I need empty tags.

I would appreciate If anyone of you could help.


Code snippet -
string str = ds.GetXml() + ds1.GetXml()
str = "<demo>" + str + "</demo>";
return str;
Updated 19-Dec-11 21:58pm
Sergey Alexandrovich Kryukov 20-Dec-11 2:28am    
What do you mean by an empty tag? An example, please. Why do you need them? Don't think you can just walk out not answering why and still hope for good answers. Why?
Lousy Programmer 20-Dec-11 2:33am    
empty tag means suppose a field in a column is empty for a particular row so that tag is not included in xml.

suppose a table emp
has 4 columns empid,name,sal,desg
for some record if say desg is not filled
then in xml desg tag is not found for that record
Sergey Alexandrovich Kryukov 20-Dec-11 22:08pm    
OK, you explained what is the empty tag (not what I expected; missing tag cannot be called "empty"). Database column cannot be empty though; the value can be null or something else. Now, you say "For some reason I need empty tags". I wonder, what is that reason? Skipping tags in not the usual way of representing database table in XML.
AmitGajjar 20-Dec-11 4:49am    
is it fine if you add Schema information as overhead, in that case database structure will also be added. i am not sure if empty tags is also included or not but can you try it ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900