473,390 Members | 901 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,390 software developers and data experts.

XML String into DataSet?

I've just started using managed extensions to write a web service, the
learning curve seems pretty steep! Currently I'm stuck at this bit: my web
service gets a String * of XML data. I want to read this into a DataSet and
validate it against a schema.

I think I need to use DataSet->ReadXML to load it, but I don't know how to
get from a String * to a Stream * (if indeed it needs to be loaded as a
stream).

Also, when I imported my schema into the solution, VS.NET 2003 created a
header file and an xsx file, but I'm lost as how I can use these to validate
my DataSet.

Thanks,

Paul
Nov 16 '05 #1
2 18353
Hi Paul,

Thank you for your question. If your XML data is in a String, then you
could do something like this.

pDS->ReadXml(new StringReader(pXMLStr) )

Thanks,
Rick [MSFT]

This posting is provided "AS IS", with no warranties, and confers no rights.

--------------------
| Reply-To: <pa**@palmnospam.com>
| From: <pa**@palmnospam.com>
| Subject: XML String into DataSet?
| Date: Mon, 20 Oct 2003 22:57:50 +1000
| Lines: 18
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <uo**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vc
| NNTP-Posting-Host: 220-244-15-103-qld.tpgi.com.au 220.244.15.103
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29568
| X-Tomcat-NG: microsoft.public.dotnet.languages.vc
|
| I've just started using managed extensions to write a web service, the
| learning curve seems pretty steep! Currently I'm stuck at this bit: my
web
| service gets a String * of XML data. I want to read this into a DataSet
and
| validate it against a schema.
|
| I think I need to use DataSet->ReadXML to load it, but I don't know how to
| get from a String * to a Stream * (if indeed it needs to be loaded as a
| stream).
|
| Also, when I imported my schema into the solution, VS.NET 2003 created a
| header file and an xsx file, but I'm lost as how I can use these to
validate
| my DataSet.
|
| Thanks,
|
| Paul
|
|
|
Nov 16 '05 #2
Thanks Rick

"Rick [MSFT]" <ri******@online.microsoft.com> wrote in message
news:26**************@cpmsftngxa06.phx.gbl...
Hi Paul,

Thank you for your question. If your XML data is in a String, then you
could do something like this.

pDS->ReadXml(new StringReader(pXMLStr) )

Thanks,
Rick [MSFT]

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
| Reply-To: <pa**@palmnospam.com>
| From: <pa**@palmnospam.com>
| Subject: XML String into DataSet?
| Date: Mon, 20 Oct 2003 22:57:50 +1000
| Lines: 18
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <uo**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vc
| NNTP-Posting-Host: 220-244-15-103-qld.tpgi.com.au 220.244.15.103
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29568
| X-Tomcat-NG: microsoft.public.dotnet.languages.vc
|
| I've just started using managed extensions to write a web service, the
| learning curve seems pretty steep! Currently I'm stuck at this bit: my
web
| service gets a String * of XML data. I want to read this into a DataSet
and
| validate it against a schema.
|
| I think I need to use DataSet->ReadXML to load it, but I don't know how to | get from a String * to a Stream * (if indeed it needs to be loaded as a
| stream).
|
| Also, when I imported my schema into the solution, VS.NET 2003 created a
| header file and an xsx file, but I'm lost as how I can use these to
validate
| my DataSet.
|
| Thanks,
|
| Paul
|
|
|

Nov 16 '05 #3

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

Similar topics

3
by: Dave Byron | last post by:
I am having trouble with DBNull's from my SQL server. I am building/converting a asset web app from Access and my db has nulls on various fields . I have tried searching newsgroups and tried to get...
1
by: R.A. | last post by:
Hi I have the following method: public string FindNameList (string XmlStore) I have a dataset based on xml schema. I have created the schema in vs editor and created the dataset based on...
7
by: Sharon | last post by:
I have successfully loaded a DataSet object with a XML schema (XSD). Now I wish to populate the tables that was created in the DataSet. I have an XML file/string that contain all the needed data...
2
by: sbox | last post by:
I've got an error "System.FormatException: Input string was not in a correct format." while I'm implementing a datagrid and a textbox What's wrong with it? Sub Button1_Click(sender As Object, e...
3
by: John | last post by:
Hi I have a dataset from a web service. I want to use a dataadapter with the dataset. What connection string should I use so the da knows that it is acting on the remote db associated with the...
8
by: moondaddy | last post by:
I need to convert a byte array to a string and pass it as a parameter in a URL and then convert it back to the original byte array. However, its getting scrambled in the conversion. In short,...
12
by: Marc | last post by:
I have used XMLDataToString = DataSetForXML.GetXml() to get an XML string from a dataset. I am looking for a way to create a dataset from this XML string. I tried...
5
by: glenn | last post by:
Hi folks, The problem I have is that a query string works if hard-coded but if I pass a variable to it, it does not work as shown here. This works: querystring="SELECT * FROM USERS WHERE...
1
by: Deecrypt | last post by:
Hi, Passing a string parameter to a webservice to get the dataset generated as the result, seems to give me an error suggesting that no parameter is being passed. However it works if I explicitly...
0
by: =?Utf-8?B?TGFzdGJ1aWxkZXJz?= | last post by:
Hi all, I have a weird problem which has been causing me a headache for the last two days. I have to dynamicly generate a schema in memory and load it into a dataset in memory to be returned...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...

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.