469,275 Members | 1,825 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

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 18266
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John | last post: by
12 posts views Thread by Marc | last post: by
1 post views Thread by Deecrypt | last post: by
reply views Thread by =?Utf-8?B?TGFzdGJ1aWxkZXJz?= | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.