473,396 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Dataset.GetXML() method doesn't Return Null Values. Any Solution?

Hi All,

Thanks for u r Valuable postings.
Here is a Problem for me.

I need to reprsent the NULL value of a column in Database in an XML
File as follows.

<Employees>
<Employee>
<Name>John</Name>
</Addr>
<City>NewYork</City>
</Employee>
</Employees>

Here </Addr> represents a null field in Database.
But using Dataset.GetXML() method I am getting the XML O/p as follows.
<Employees>
<Employee>
<Name>John</Name>
<City>NewYork</City>
</Employee>
</Employees>

Can Any body help me from this situation?
Thanks in Advance
Regards
Nanda

Nov 29 '05 #1
1 2761
Hi,

This is because it is containing NULL (DBNull.Value) - it is being
ignored.
Maybe, you can traverse for column having DBNull.Value & make it blank

Then, I guess it should emit XML the way you want

HTH
Kalpesh

Nov 29 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sunny | last post by:
Hi, I am trying to use the GetXml() function of my DataSet, and its returning all the rows and their values correctly in Elements format. How can i change this default behaviour of the GetXml()...
2
by: Rajesh AVRS | last post by:
Hi guys I have a requirement where I needed to extract the DataSet contents as XML. After filling the dataset, I am calling GetXml() and is working fine. However, one of the column which I...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
3
by: Mark | last post by:
I have run into a problem that I have not found an easy solution for. My data all resides in a dataset and we're using getxml to return the xml and send that on to the webserver for processing. It...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
1
by: Elad | last post by:
hi, I'm sorry if this isn't the right group, I just didnt know which category to place this question in. Anyway, I have 2 problems: I got a web service which connects to a DB and puts the data in...
13
by: Maxwell2006 | last post by:
Hi, We are having a debate over using DataSet as return value type for web services. The problem is that we don't know whether Java applications can use DataSet
1
by: lucky | last post by:
Hi guys! i've filled the DatSet object and was trying to get xml data from it. i used GetXml() method for that. it worked fine when all columns of the datatable has data. it generates perfectly...
3
by: Greg Collins [Microsoft MVP] | last post by:
I have a SQL2005 XML column I load into a DataSet. I then bind to a DataGrid. If I set an asp:Literal text value to the DataSet.GetXml() when I first load it into the DataSet, it displays...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.