473,890 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert XML String to Dataset

I have used XMLDataToString = DataSetForXML.G etXml() to get an XML string
from a dataset. I am looking for a way to create a dataset from this XML
string. I tried DataSetForXML.R eadXml(XMLDataT oString) but I received error
messages. Does anyone know how to do this without creating a file (disk
copy) of this XML data? Thanks for your help.
Marc
Nov 21 '05
12 23787
Jay,

However I would strongly recommend you read the entire section & Sceppa's
book.

Nothing wrong with your message and advice, however we missed this probably
for more than a year now.

To let you deal in my friendly smile.

:-)

Cor
Nov 21 '05 #11
Ah, said the blind man as he stumbled merrily along his way! I found them.
Thx!

"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:eV******** ******@TK2MSFTN GP12.phx.gbl...
Bryan,
DataTable & DataColumn are types.

Remember that a DataSet contains zero or more DataTables, that a DataTable
has one or more DataColumns, and zero or more DataRows.

In other words the DataSet has a Tables property that returns a
DataTableCollec tion type. The DataTableCollec tion contains a collection of
DataTables. The DataTable has a Columns property that returns a
DataColumnColle ction type. The DataColumnColle ction contains a collection
of
DataColumns.

You may want to review this section of MSDN:

http://msdn.microsoft.com/library/de...withadonet.asp

Specifically:

http://msdn.microsoft.com/library/de...ewofadonet.asp

http://msdn.microsoft.com/library/de...netdataset.asp

http://msdn.microsoft.com/library/de...ngdatasets.asp

http://msdn.microsoft.com/library/de...datatables.asp

http://msdn.microsoft.com/library/de...gdataviews.asp

However I would strongly recommend you read the entire section & Sceppa's
book.

Hope this helps
Jay

"Bryan Dickerson" <tx******@netsc ape.net> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
| Oh, and I meant to answer with another question yesterday (but was at
home
| sick yesterday): I didn't find any "DataTable" or "DataColumn "
| properties/methods on the Dataset class. So what am I not seeing?
|
| "Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in
message
| news:uK******** ******@TK2MSFTN GP10.phx.gbl...
| > Bryan,
| > MSDN (http://msdn.microsoft.com) although I prefer the online local
help
| > over the web help, however the content is the same.
| >
| > Plus a plethora of other sites, google on DataSet and/or DataTable...
| >
| > I would strongly recommend Sceppa's book! As its both a good tutorial
&
a
| > good desk reference. Far "better" & more "complete" then anything
thing
| > else
| > I've seen on ADO.NET.
| >
| > Hope this helps
| > Jay
| >
| > "Bryan Dickerson" <tx******@netsc ape.net> wrote in message
| > news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
| > | Do you know of anything online docs that might tell me something
| > similar?
| > |
| > | "Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in
| > message
| > | news:O%******** *******@TK2MSFT NGP12.phx.gbl.. .
| > | > Bryan,
| > | > You can get the DataColumns of a DataTable via the
DataTable.Colum ns
| > | > property.
| > | >
| > | > For a complete explanation of Datasets, DataTables, & DataAdapters
| > along
| > | > with how to use them. I would strongly recommend you read David
| > Sceppa's
| > | > book "Microsoft ADO.NET - Core Reference" from MS Press. As it is
both
| > a
| > | > good tutorial on ADO.NET as well as a good desk reference once you
| > know
| > | > ADO.NET.
| > | >
| > | > Hope this helps
| > | > Jay
| > | >
| > | >
| > | > "Bryan Dickerson" <tx******@netsc ape.net> wrote in message
| > | > news:u4******** ******@TK2MSFTN GP15.phx.gbl...
| > | > |I know this is almost a month old, but I was having the same
| > challenges
| > | > and
| > | > | tried your suggestions. They worked fine, but now, how do I get
to
| > the
| > | > | fields in the Dataset?? Do they 'magically' appear as
| > | > | ".Fields(<Field name>).Value" once the XML String is read??
| > | > |
| > | > | "Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote
in
| > | > message
| > | > | news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
| > | > | > Mark,
| > | > | > Notice that DataSet.ReadXml is overloaded. ReadXml(String)
reads
| > Xml
| > | > from
| > | > | > the named file.
| > | > | >
| > | > | > Have you tried ReadXml(TextRea der)? Specifically with a
| > StringReader?
| > | > | >
| > | > | > Something like:
| > | > | >
| > | > | > Dim reader As New System.Io.Strin gReader(XMLData ToString)
| > | > | > DataSetForXML.R eadXml(reader)
| > | > | >
| > | > | > For details see:
| > | > | >
| > | > | >
| > | >
| >
http://msdn.microsoft.com/library/de...ClassTopic.asp
| > | > | >
| > | > | >
| > | >
| >
http://msdn.microsoft.com/library/de...dXmlTopic3.asp
| > | > | >
| > | > | > Hope this helps
| > | > | > Jay
| > | > | >
| > | > | >
| > | > | > "Marc" <Ma**@discussio ns.microsoft.co m> wrote in message
| > | > | > news:D3******** *************** ***********@mic rosoft.com...
| > | > | > |I have used XMLDataToString = DataSetForXML.G etXml() to get
an
| > XML
| > | > string
| > | > | > | from a dataset. I am looking for a way to create a dataset
from
| > | > this
| > | > | > XML
| > | > | > | string. I tried DataSetForXML.R eadXml(XMLDataT oString) but
I
| > | > received
| > | > | > error
| > | > | > | messages. Does anyone know how to do this without creating
a
| > file
| > | > (disk
| > | > | > | copy) of this XML data? Thanks for your help.
| > | > | > | Marc
| > | > | >
| > | > | >
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|

Nov 21 '05 #12
Jay,

I use deal to often, when I mean share.
To let you deal in my friendly smile.

To let you share my friendly smile.

:-)

Cor
Nov 21 '05 #13

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

Similar topics

2
2766
by: Nathan | last post by:
Is there a way to convert a string to a CipherMessage? I am calling a function that decrypts a CipherMessage and returns the value. The only problem is when I want to use an encrypted value stored in a querystring, I can't figure out how to convert it back to a CipherMessage.
2
4598
by: Todd | last post by:
This is my first time trying to take the results of a query that reside in a Dataset and convert the dataset into an xml file. Everything works great, except that my resulting XML file is missing the xml declaration (the first line): <?xml version="1.0" encoding="iso-8859-1"?> Below is an example of the code I am using: dataset.Namespace = "RatesXML" Dim xmlFilename As String = "myXmlDocument.xml" Dim fsWriteXml As New...
1
6683
by: Anandan | last post by:
Hi, This is regarding Dataset Filter: WILDCARD CHARACTERS Both the * and % can be used interchangeably for wildcards in a LIKE comparison. If the string in a LIKE clause contains a * or %, those characters should be escaped in brackets (). If a bracket is in the clause, the bracket characters should be escaped in brackets (for example or
3
3473
by: Petr Jakes | last post by:
Hi, I am trying to convert string to the "escaped string". example: from "0xf" I need "\0xf" I am able to do it like: a="0xf" escaped_a=("\%s" % a ).decode("string_escape") But it looks a little bit complicated in this beautiful language to me .....
5
6857
by: needin4mation | last post by:
Hi, I have a webservice that just returns a count: public DataSet HelloWorld() { OdbcConnection conn = new OdbcConnection("DSN=xxx"); String sqlString = "select count(*) as employee from employees"; DataSet myResults = new DataSet(); OdbcDataAdapter myAdapter = new OdbcAdapter(sqlString, conn); myAdapter.Fill(myResults); return myResults;
3
7998
by: Ursula | last post by:
Is it possible to convert a string in a file. The problem is this: I have an object string that is a file xml and I want to pass to Deserialize function, but Deserialize function expect an object of FileStream type and the mode access. There is a function Convert.ChangeType(object value, Type conversionType), but I cant write for example: Convert.ChangeType(mystring, FileStream); CAN YOU HELP ME????? thanks
3
9904
by: Shawn Ferguson | last post by:
Hello All, I'm trying to do what I would think would be simple and straightforward, but it is not. I have a 2 textbox on a form, a label, and a button, when I click the botton I want to add the 2 textboxes and place the value in the label. Unfortunately, when I try to convert.Int32(txtBox1.Text) I get cannot convert string to int error. Basically, Im doing this: int x; int y; x = (int) Convert.ToInt32(TextBox1.Text); y = (int)...
4
17388
by: Man4ish | last post by:
HI , I am trying to convert string into char array of characters.but facing problem. #include <iostream> #include <string> using namespace std; int main() { string t="1,2,3,4,5,6";
12
13584
by: Peter | last post by:
Trying to convert string to byte array. the following code returns byte array of {107, 62, 194, 139, 64} how can I convert this string to a byte array of {107, 62, 139, 65} System.Text.UTF8Encoding str = new System.Text.UTF8Encoding(); string s = new string((char)107, 1); s += new string((char)62, 1);
9
8260
by: engteng | last post by:
How do I convert string to numeric in VB.NET 2003 ? Example convert P50001 to 50001 or 50001P to 50001 but if P is in middle then not convert. Regards, Tee
0
9970
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
9810
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10794
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...
1
10896
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9612
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
8000
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
5830
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...
0
6031
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4251
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.