XML String into DataSet?

G

Guest

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
 
R

Rick [MSFT]

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: <[email protected]>
| From: <[email protected]>
| 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: <[email protected]>
| 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!TK2MSFTNGP12.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
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top