473,807 Members | 2,883 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to do parsing and then storing content in the buffer

vk

can you help me out in this
....
<IMG style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px;
PADDING-LEFT: 0px; LEFT: -108px; PADDING-BOTTOM: 0px; MARGIN: 0px;
BORDER-LEFT: 0px; WIDTH: 256px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px;
POSITION: absolute; TOP: -175px; HEIGHT: 256px"
src="http://mt0.google.com/mt?n=404&v=ap.1 4&x=1314&y=3174 &zoom=4"
unselectable="o n" galleryImg="no" coordX="0" coordY="0" priority="0">

i need to parse this string and i have to fetch url and coordinates
value of X and Y from this and has to store them in buffer ..
can anybody provide me with coding for this ..
thanx in advance

Jul 21 '06 #1
2 1338
vk said the following on 7/21/2006 4:12 AM:
can you help me out in this
Yes, what do I get for it?
....
<IMG style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px;
PADDING-LEFT: 0px; LEFT: -108px; PADDING-BOTTOM: 0px; MARGIN: 0px;
BORDER-LEFT: 0px; WIDTH: 256px; PADDING-TOP: 0px; BORDER-BOTTOM: 0px;
POSITION: absolute; TOP: -175px; HEIGHT: 256px"
src="http://mt0.google.com/mt?n=404&v=ap.1 4&x=1314&y=3174 &zoom=4"
unselectable="o n" galleryImg="no" coordX="0" coordY="0" priority="0">
Hmmm, lots of IE crap code in there that doesn't affect me, but ok.
i need to parse this string and i have to fetch url
"fetch url"? Just read it's src property.
and coordinates value of X and Y from this
getAttribute('c oordX')
getAttribute('c oordY')
and has to store them in buffer ..
What buffer?
can anybody provide me with coding for this ..
Probably so.
thanx in advance
Sure.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 21 '06 #2
Randy Webb wrote:
and coordinates value of X and Y from this

getAttribute('c oordX')
getAttribute('c oordY')
I suppose what he actually wanted to know was how to parse the coordX
and coordY parameters with a regular expression and...
and has to store them in buffer ..

What buffer?
.... store the matches in an array or something.
can anybody provide me with coding for this ..
There you go:
-------------------------------------

var foo = '<IMG style="BOR [...] oordY="0" priority="0">';
var match =
foo.match(/src="([^"]+)".*?coordX="( \d+)".*?coordY= "(\d+)"/);

-------------------------------------

You'll find the URL in match[1], the X coordinate in match[2] and the
the Y coordinate in match[3].

Jul 22 '06 #3

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

Similar topics

6
19471
by: Ratnakar Pedagani | last post by:
Hi, I'm trying to parse the text file, which is of size more than 2mb. I'm using the following sample code Open "c:\sim1.txt" For Input As #1 Do While Not EOF(1) Input #1, Data If (InStr(Data, "Summary")) Then
0
11570
by: Antwerp | last post by:
Hi, I'm trying to create a perl script that will log into a website (the login form uses POST), navigate to several pages, and append the (html) content parsed from those pages to a seperate log file. I'm not very familiar with this aspect of perl, and have been having some trouble in the POSTing of the form data, while using cookies to log in. Visting the site automatically redirects you to a login page. Once you fill out the login...
3
3072
by: Girish | last post by:
Hi All, I have written a component(ATL COM) that wraps Xerces C++ parser. I am firing necessary events for each of the notifications that I have handled for the Content and Error handler. The events can then I am able to parse XML input in the form of files. I also have provided support for parsing of XML content in the form of string data. I am able to do so by creating a MemBufInputSource object using the XML content provided to the...
12
5622
by: BGP | last post by:
I am working on a WIN32 API app using devc++4992 that will accept Dow Jones/NASDAQ/etc. stock prices as input, parse them, and do things with it. The user can just cut and paste back prices into a window and hit a button to process it. The information thus enters the program as a char array. Prices can be between $1 and $100, including cents. So we can have prices such as 3.01, 1.56, 11.57, etc. The char array is an alphanumeric...
9
4655
by: (Pete Cresswell) | last post by:
I see this coming on a develpment effort that may materialize shortly. These guys don't want to mess around with automated imports from text feeds BC in the past they've had too many problems with same. Instead, they (heavy spreadsheet users...) want to "Copy and Paste" financial return percentages for various funds into the DB. The source of these copies may be ascii text...but it's also likely to be an Excel spreadsheet on occasion.
3
17398
by: Cuong.Tong | last post by:
Greeting, I am writing my own web server and having some problme parsing the the mulitpart/form-data stream that is sent from the browsers. I have a form looks something like this <form action="process.dll>
3
4390
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 the file) with the location. And for a particular section I parse only that section. The file is something like, .... DATAS
2
4889
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 data reading. For instance this is my buffer string: 012301234FFFFFFxFFFFFFxFFFFFFx Where the FFFFFF is my Hex data I need to read. I am using the "x" as a separater as I was having problems using the VbCrLf. But I think
0
1606
by: Buglish | last post by:
Hi, Task : -Capture a HTML table with use of regular expression from a text string buffer(entire document). –Pass it to another function to create a multi dimension array out of it. - Pass it to another function to build it into a RTF table. -Then return it back to the regular expression to replace the search result. Difficulty: -The regular expression doesn’t pass the back referenced table fields to the next function.
0
9720
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...
1
10374
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,...
1
7650
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
6879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
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
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3854
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.