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

Parsing XML from String

I am having difficulty taking an xml string passed as a
string from a web service. I am not using SOAP, but rather
calling the web service within an ASP.NET web form.
Reviewing the XML object model I am only finding file
parsing and I/O stream handling. Can anyone help out with
how this would be done?

This is just a simple test to get the returned method
values which are returned from the web service as a string.

private void cmdAirport_Click(object sender,
System.EventArgs e)
{
localhost.AirportInfo Fetch = new localhost.AirportInfo();
string Results;
if (txtCode.Text != "")
{
Results = Fetch.GetInfo(txtCode.Text);

txtResult.Text = Results;
}
}
Nov 15 '05 #1
4 1650
Hi,

"Chad Scharf" <ch*********@navigant.com> wrote in message
news:00****************************@phx.gbl...
I am having difficulty taking an xml string passed as a
XmlDocument.LoadXml(string)

HTH,
Greetings
string from a web service. I am not using SOAP, but rather
calling the web service within an ASP.NET web form.
Reviewing the XML object model I am only finding file
parsing and I/O stream handling. Can anyone help out with
how this would be done?

This is just a simple test to get the returned method
values which are returned from the web service as a string.

private void cmdAirport_Click(object sender,
System.EventArgs e)
{
localhost.AirportInfo Fetch = new localhost.AirportInfo();
string Results;
if (txtCode.Text != "")
{
Results = Fetch.GetInfo(txtCode.Text);

txtResult.Text = Results;
}
}

Nov 15 '05 #2
That's great but I'm still having difficulty getting that
into a dataset.
-----Original Message-----
Hi,

"Chad Scharf" <ch*********@navigant.com> wrote in message
news:00****************************@phx.gbl...
I am having difficulty taking an xml string passed as a


XmlDocument.LoadXml(string)

HTH,
Greetings
string from a web service. I am not using SOAP, but rather calling the web service within an ASP.NET web form.
Reviewing the XML object model I am only finding file
parsing and I/O stream handling. Can anyone help out with how this would be done?

This is just a simple test to get the returned method
values which are returned from the web service as a string.
private void cmdAirport_Click(object sender,
System.EventArgs e)
{
localhost.AirportInfo Fetch = new localhost.AirportInfo (); string Results;
if (txtCode.Text != "")
{
Results = Fetch.GetInfo(txtCode.Text);

txtResult.Text = Results;
}
}

.

Nov 15 '05 #3
hi,

<an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
That's great but I'm still having difficulty getting that
into a dataset.


string xmlData = "...";
System.IO.StringReader xmlSR = new System.IO.StringReader(xmlData);
myDS.ReadXml(xmlSR, XmlReadMode.Auto);
xmlSR.Close();

HTH,
greetings
-----Original Message-----
Hi,

"Chad Scharf" <ch*********@navigant.com> wrote in message
news:00****************************@phx.gbl...
I am having difficulty taking an xml string passed as a


XmlDocument.LoadXml(string)

HTH,
Greetings
string from a web service. I am not using SOAP, but rather calling the web service within an ASP.NET web form.
Reviewing the XML object model I am only finding file
parsing and I/O stream handling. Can anyone help out with how this would be done?

This is just a simple test to get the returned method
values which are returned from the web service as a string.
private void cmdAirport_Click(object sender,
System.EventArgs e)
{
localhost.AirportInfo Fetch = new localhost.AirportInfo (); string Results;
if (txtCode.Text != "")
{
Results = Fetch.GetInfo(txtCode.Text);

txtResult.Text = Results;
}
}

.

Nov 15 '05 #4
Thank you, this works beautifully!
-----Original Message-----
hi,

<an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
That's great but I'm still having difficulty getting that
into a dataset.
string xmlData = "...";
System.IO.StringReader xmlSR = new System.IO.StringReader

(xmlData);myDS.ReadXml(xmlSR, XmlReadMode.Auto);
xmlSR.Close();

HTH,
greetings
>-----Original Message-----
>Hi,
>
>"Chad Scharf" <ch*********@navigant.com> wrote in message >news:00****************************@phx.gbl...
>> I am having difficulty taking an xml string passed as a >
>XmlDocument.LoadXml(string)
>
>HTH,
>Greetings
>
>> string from a web service. I am not using SOAP, but

rather
>> calling the web service within an ASP.NET web form.
>> Reviewing the XML object model I am only finding file
>> parsing and I/O stream handling. Can anyone help out

with
>> how this would be done?
>>
>> This is just a simple test to get the returned method
>> values which are returned from the web service as a

string.
>>
>> private void cmdAirport_Click(object sender,
>> System.EventArgs e)
>> {
>> localhost.AirportInfo Fetch = new
localhost.AirportInfo ();
>> string Results;
>> if (txtCode.Text != "")
>> {
>> Results = Fetch.GetInfo(txtCode.Text);
>>
>> txtResult.Text = Results;
>> }
>> }
>
>
>.
>

.

Nov 15 '05 #5

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...
6
by: BerkshireGuy | last post by:
Does anyone know of a good function that will parse out parts of an SQL statement that is passed to it in seperate variables? It should be able to parse statements that contain ORDERBY, WHERE,...
9
by: Paulers | last post by:
Hello, I have a log file that contains many multi-line messages. What is the best approach to take for extracting data out of each message and populating object properties to be stored in an...
3
by: Anup Daware | last post by:
Hi Group, I am facing a strange problem here: I am trying to read xml response from a servlet using XmlTextWriter. I am able to read the read half of the xml and suddenly an exception:...
3
by: aspineux | last post by:
My goal is to write a parser for these imaginary string from the SMTP protocol, regarding RFC 821 and 1869. I'm a little flexible with the BNF from these RFC :-) Any comment ? tests= def...
2
by: RG | last post by:
I am having trouble parsing the data I need from a Serial Port Buffer. I am sending info to a microcontroller that is being echoed back that I need to remove before I start the actual important...
6
by: gw7rib | last post by:
I have a program that needs to do a small amount of relatively simple parsing. The routines I've written work fine, but the code using them is a bit long-winded. I therefore had the idea of...
1
by: hd95 | last post by:
In a perfect world my xml feed source would produce perfect xml ..that is not the case I am parsing an XML feed that sometimes has ampersands and dashes in the content that messes up my parsing. ...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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
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...

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.