Click here to Skip to main content
16,021,169 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
Hi,

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.

Thanks

Code snippet -
C#
string str = ds.GetXml() + ds1.GetXml()
str = "<demo>" + str + "</demo>";
return str;
Posted
Updated 19-Dec-11 21:58pm
v2
Comments
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?
--SA
Lousy Programmer 20-Dec-11 2:33am    
@SAKyrukov
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.
--SA
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