473,651 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Customizing XML from DataSet

Hi all!

I have a dataset filled containing one row of data. Dataset.WriteXM L gives
me this:

<Article>
<Table>
<aID>10</aID>
<aHeader>Some text goes here</aHeader>
<aDate>2003-07-04T12:06:00.000 0000+02:00</aDate>
<authorID>1</authorID>
<pID>2</pID>
<authorID1>1</authorID1>
<pID1>2</pID1>
</Table>
</Article>

But I would rather have it like this:

<Article>
- <Table>
<aHeader>Some text goes here</aHeader>
<aDate>2003-07-04T12:06:00.000 0000+02:00</aDate>
<authorID>1</authorID>
</Table>
</Article>

Dataset.WhiteXm lSchema gives me this:

<?xml version="1.0" ?>
- <xs:schema id="NewDataSet " xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSe t" msdata:IsDataSe t="true"
msdata:Locale=" sv-SE">
- <xs:complexType >
- <xs:choice maxOccurs="unbo unded">
- <xs:element name="Table">
- <xs:complexType >
- <xs:sequence>
<xs:element name="aID" type="xs:int" minOccurs="0" />
<xs:element name="aHeader" type="xs:string " minOccurs="0" />
<xs:element name="aDate" type="xs:dateTi me" minOccurs="0" />
<xs:element name="authorID" type="xs:int" minOccurs="0" />
<xs:element name="pID" type="xs:int" minOccurs="0" />
<xs:element name="authorID1 " type="xs:int" minOccurs="0" />
<xs:element name="pID1" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

But I suppose I'd rather want it like this:

<?xml version="1.0" ?>
- <xs:schema id="NewDataSet " xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSe t" msdata:IsDataSe t="true"
msdata:Locale=" sv-SE">
- <xs:complexType >
- <xs:choice maxOccurs="unbo unded">
- <xs:element name="Table">
- <xs:complexType >
- <xs:sequence>
<xs:element name="aHeader" type="xs:string " minOccurs="0" />
<xs:element name="aDate" type="xs:dateTi me" minOccurs="0" />
<xs:element name="authorID" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

Can anybody help me? Is there any way to force the dataset into the shape of
a user-specified schema? Or would that be the wrong approach.

/john
Nov 17 '05 #1
0 1129

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

Similar topics

3
2355
by: Peter Schwalm | last post by:
I'd like to modify the python search path depending on the source directory of the script being started. The reason is: I use a version control system, and the python scripts and modules are migrated through several stages before they are used in production. A python script running in a development environment should use different modules - possibly in other directories then the script source directory - than the same script running in a...
6
2625
by: Jason | last post by:
Sorry for the post here but could not find an Exchange newgroup. I developed an application a year or 2 ago that sends SMTP email. The application allows the user to customize the text from address. is "My Custom Name" Jason@Yahoo.com. When the email was received into my companies Exchange 5.5 mail system the custom name was kept intact. Now that
1
400
by: Job Lot | last post by:
How can embed company logo in title section of setup dialog box?
2
1764
by: Job Lot | last post by:
I am customizing DataGridTextBoxColumn. How can I access properties in DataGrid to which custom DataGridTextBoxColumn will be added. Say for instance, how I would access SelectionBackColor property of the DataGrid to which this custom column is added? Do I have to get to the table style as column is added to table style and then find out which DataGrid this table style is added to and then find SelectionBackColor of that DataGrid?
1
1312
by: kjcox | last post by:
I've been using DocBook and XML for quite some time now. It works great for making simple HTML pages, http://gnuware.com/icecast/. I normally use it on RHEL and do not customize anything other than use the "docbook2html" command. It compiles my book and all chapters no problem. However, lately I have been needing to add custom fonts, unique colors to text and headers, and new items not normally covered under the...
4
6675
by: VR | last post by:
I am trying to embed a check box into a FlexGrid's cell, but having a problem when I start scrolling the grid. Here is my MyCheckBox class... class MyCheckBox : CheckBox { void Init ( AxMSFlexGridLib.AxMSFlexGrid oGrid,
0
288
by: John Knoop | last post by:
Hi all! I have a dataset filled containing one row of data. Dataset.WriteXML gives me this: <Article> <Table> <aID>10</aID> <aHeader>Some text goes here</aHeader> <aDate>2003-07-04T12:06:00.0000000+02:00</aDate>
1
1378
by: anony | last post by:
What is the desired way to deliver a customized view of a database query? The scenario is that I want to group records based on similar fields. Can I use any built in data controls and achieve this level of customization? I can accomplish my custom view via Response.Write, but this can't be the way to go, for no other reason than it dumps out HTML prior to the <HTML> tag. For example: The data:
3
16866
by: Stig Nielsson | last post by:
Hi, I am using a strongly typed dataset in .Net 2.0, and would like all tables to inherit from a cusomt datatable class instead of DataTable. The reason for this is that I want some common code excuted on the row events, and this I want to implement this once in a Table base class. ie. instead of having this code generated:
1
1466
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
I'm working in Visual Studio 2005. I'm looking at two tables in the Data Set Designer. There's a relation between the two tables that lists 7 matching columns. Works great. One of the key columns from each table is called "Team". Valid values are F1 through F7, and when they match, the result set works exactly like you'd think it would. The problem is that somebody decided to put in a "Team" value of ALL, which
0
8347
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8792
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8694
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8571
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1905
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.