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

Read from webpage ?

Is there a way i can read xml from a webpage.

The situation is that i have to type in an Url with some parameters (a
login), when the page returns, it returns an ID that i have to use
through the session, the ID is retuned in XML format, and this is what
i need to read.

The Xml page looks like this :

________________________

<?xml version="1.0" encoding="ISO-8859-1" ?>
<logon>
<user_id>440842875</user_id>
</logon>
________________________
Nov 12 '05 #1
1 1265
XmlDocument.Load supports loading document from a given URL.
Then you could extract that ID and maybe put it in a session variable:
XmlDocument doc = new XmlDocument();
doc.Load(http://myurl.com?param=value);
string id = doc.DocumentElement.FirstChild.InnerText;
// Assume in System.Web.UI.Page context.
base.Session ["user_id"] = id;
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Kenneth Johansen" <kj****@hotmail.com> wrote in message
news:51**************************@posting.google.c om...
Is there a way i can read xml from a webpage.

The situation is that i have to type in an Url with some parameters (a
login), when the page returns, it returns an ID that i have to use
through the session, the ID is retuned in XML format, and this is what
i need to read.

The Xml page looks like this :

________________________

<?xml version="1.0" encoding="ISO-8859-1" ?>
<logon>
<user_id>440842875</user_id>
</logon>
________________________

Nov 12 '05 #2

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

Similar topics

5
by: John Bradley | last post by:
Toooo tired to look this one up. I have data that I need to acces in a small program. The data is accessable from an ASP webpage that I created myself. If I need to see data from record #25, I...
0
by: KC | last post by:
Is there a simple way to read (and parse) a webpage with a VB.net application. Right now I can sort of read a page but it's a framed page and the server thinks the app is a browser that can't...
17
by: chris.schwalm | last post by:
I would like to first state that I have searched through the archives and found a lot of related material, but am still new enough to javascript that I can't fit all the pieces together yet. So...
1
by: Juergen Wohnich | last post by:
I want to read a webpage in chart buffer and than i want to parse it. If have found out that "CInternetSession.OpenURL" is the way to do this, but now i seraching for a complete sample. Maybe a...
5
by: bobbyd | last post by:
Hi All, Does anyone know of a way to read an output from an external webpage/service? For example; The external source is on http://serverA:6010/sendoutput This page displays one line of...
1
by: Rajen | last post by:
I've a automatic configuration proxy (http://xxx.xxx.xxx.xxx/xyz.pac) which I use in the Internet explorer Lan Settings to access the net. How do I read a webpage by specifying this proxy in my...
2
by: tovishal2001 | last post by:
Hi, I am trying to read first 6000 bytes from a webpage, using StreamReader.Read(buffer, offset, no_of_bytes_to_read) method and trying to close the connection. Because, the useful data I need is...
1
by: AroopNerd | last post by:
Can you give me any idea…. just want to read a line of text from a webpage and store it in a string variable using desktop vb.net.
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
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.