473,387 Members | 1,540 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,387 software developers and data experts.

XML parsing

I have the following:

Dim xmlPSELL As New XmlDataDocument
Dim sXML as String

sXML = (some well formed XML code)

xmlPSELL.LoadXml(sXML)

so far this works just fine...
now I want to be able to load the sXML string into the xmlPSELL.DataSet.
How the heck do I do something like this:

xmlPSELL.DataSet.LoadXml(sXML)

Thanks,
Brian
Nov 20 '05 #1
3 1251
Cor
Hi Brian,

If I see it good than is this a mistake that is often made.

A dataset can be represented and used as an XML file.

An XML file is not a dataset.

So you first have to create your dataset (using the designer, code does not
mather) and then you can fill that dataset.

Is your XML file conform the XML dataset than it is just read the dataset
with mydataset.readXML(myxmlfile.xml)

Others you will have to go to the XML file reading/processing your XML doc.

You can use for that the XMLreader or as you said by using loadXML

I hope this helps?

Cor

Nov 20 '05 #2
Cor,

I saw in the documentation where I could load it as a file. The only
problem is, I'm receiving the XML string via a TCP/IP packet... so, I would
hate to save every packet as a file, then load it in again. I guess my
ideal way to do this would be to convert the string to a format that the
readXML function could use.

But, I think you may be right... I might have to save it as a file first,
then read it in again.

Thanks for your help,
Brian
"Cor" <no*@non.com> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Hi Brian,

If I see it good than is this a mistake that is often made.

A dataset can be represented and used as an XML file.

An XML file is not a dataset.

So you first have to create your dataset (using the designer, code does not mather) and then you can fill that dataset.

Is your XML file conform the XML dataset than it is just read the dataset
with mydataset.readXML(myxmlfile.xml)

Others you will have to go to the XML file reading/processing your XML doc.
You can use for that the XMLreader or as you said by using loadXML

I hope this helps?

Cor

Nov 20 '05 #3

Hi,

It is very simple to do this. You should do something like this:

dataSet.LoadXml(new StringReader(sXml))

Thanks

Nov 20 '05 #4

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

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
0
by: Pentti | last post by:
Can anyone help to understand why re-parsing occurs on a remote database (using database links), even though we are using a prepared statement on the local database: Scenario: ======== We...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
5
by: randy | last post by:
Can some point me to a good example of parsing XML using C# 2.0? Thanks
3
by: toton | last post by:
Hi, I have some ascii files, which are having some formatted text. I want to read some section only from the total file. For that what I am doing is indexing the sections (denoted by .START in...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
7
by: Daniel Fetchinson | last post by:
Many times a more user friendly date format is convenient than the pure date and time. For example for a date that is yesterday I would like to see "yesterday" instead of the date itself. And for...
1
by: eyeore | last post by:
Hello everyone my String reverse code works but my professor wants me to use pop top push or Stack code and parsing code could you please teach me how to make this code work with pop top push or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.