Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / December 2005

Tip: Looking for answers? Try searching our database.

filtering the received xml from DataSet.GetXml()

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elad - 23 Dec 2005 17:27 GMT
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 a DataSet, and sends back to the user the DataSet.GetXml()
(I know that a Dataset is serializable, but i need it's xml. anyway, this
method does not create tags with no values in the output xml, in case a
certain field in the DB equals DBNull.value, and i need it to do so - i need
it to create those fields, and not place any value in them. i thought maybe
there's a way to create a special schema to filter the output xml, but i know
to apply schemas only on the xml, which in that stage, its already too late,
because i need the schema to be applied in the dataset stage.

Also, i need the ouput xml to distinguish which field is the primary key
field in the DB table, somehow let the Dataset know which field is it, and
again - apply a schema (or any other way) on the dataset, that when i call
the method GetXml() - i'll get the xml updated - with an attribute
"<FIELD_NAME is_primary_key="true">value</FIELD_NAME>", and for all fields
which doesn't have any values stored for them in the DB -
"<FIELD_NAME></FIELD_NAME>".
btw - i work with oracle oledb.

thank you
mesterak - 26 Dec 2005 08:52 GMT
I would think a defined schema could force creation of XML nodes
corresponding to fields with no value, but the easiest workaround is to put
some dummy values in your DB fields as defaults; e.g. empty strings, zeros,
etc. instead of NULL values.

-Matt

> hi, I'm sorry if this isn't the right group, I just didnt know which category
> to place this question in.
[quoted text clipped - 18 lines]
>
> thank you

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.