page parse whit asp

Ö

Ömür UÇUM

Hi,

how can I parse a web page whit asp functions.I need only some
informations in a web page in my project.This informations are
updetede every day.And I wont to insert this informations in my
page.Can some body help me.

Thanks..
 
B

Bob Barrows

Ömür UÇUM said:
Hi,

how can I parse a web page whit asp functions.I need only some
informations in a web page in my project.This informations are
updetede every day.And I wont to insert this informations in my
page.Can some body help me.

Thanks..

Start with the vbscript documentation about string functions, as well as
the filesystemobject class in case you are asking about parsing the
files themselves.
 
B

Bob Barrows

Ömür UÇUM said:
Hi,

how can I parse a web page whit asp functions.I need only some
informations in a web page in my project.This informations are
updetede every day.And I wont to insert this informations in my
page.Can some body help me.

Thanks..

Start with the vbscript documentation
(http://www.microsoft.com/downloads/details.aspx?FamilyID=01592c48-207d-
4be1-8a76-1c4099d7bbb9&DisplayLang=en) about string functions, as well
as
the filesystemobject class in case you are asking about parsing the
files themselves.
 
E

Evertjan.

Bob Barrows wrote on 29 mrt 2010 in
microsoft.public.inetserver.asp.general:
Start with the vbscript documentation
(http://www.microsoft.com/downloads/details.aspx?FamilyID=01592c48- 207d-
4be1-8a76-1c4099d7bbb9&DisplayLang=en) about string functions, as well
as
the filesystemobject class in case you are asking about parsing the
files themselves.

I would advice to use ASP javascript and regular expression functions
under Javascript, far easier to implement than using VBscript.

examples:

txtArr = txt.match(/..../g);

or

var txt2 =
txt.replace(/^[\s\S]+?(<div id='Blah'[\s\S]+?(<\/div))[\s\S]+$/,'$1');

or even

var bool = /23\.8\d\D/.test(txt);

First download the page to your own server's string variable with

<script language=javascript runat=server>
var xmlhttp = new ActiveXObject("MSXML2.ServerXMLHTTP");
var url = 'http://myURL.nl/myPage.html';

xmlhttp.open('GET', url, 0);
xmlhttp.send('');
if (xmlhttp.status!=200) {
response.write('Not status 200');
xmlhttp = null;
response.end;
} else {
var txt = xmlhttp.responseText;
};
</script>
 

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

Members online

No members online now.

Forum statistics

Threads
473,794
Messages
2,569,641
Members
45,355
Latest member
SJLChristi

Latest Threads

Top