?
Solved

Grab XML code? from ebay site and put it into a MEMO1

Posted on 2011-04-25
8
Medium Priority
?
523 Views
Last Modified: 2012-06-27
Hi

when i click View source on the ebay page, i want to be able to pull some text into a memo1.
Im using twebbrowser, so it will need to be under when the document is complete.
The page is:

http://pages.ebay.co.uk/help/pay/payingforitems.html


Top questions
How do I know how much to pay?

How do I confirm my postal address?

Why doesn't my item appear as 'paid'?

How do I pay for my item?



This is not the exact code i want, as you will have to login to get this. However, if i understand this, i will be able to edit the code to suit my needs. Thankyou very much.
0
Comment
Question by:boycoder
  • 5
  • 3
8 Comments
 
LVL 24

Expert Comment

by:jimyX
ID: 35460371
>   "i want to be able to pull some text into a memo1"
uses MSHTML;

procedure TForm1.WebBrowser1DocumentComplete(ASender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);
var
  Doc : IHTMLDocument2;
begin
  If Assigned(WebBrowser1.Document) Then
    begin
      Doc := (WebBrowser1.Document AS IHTMLDocument2);
      Memo1.Text := Doc.Body.innerText;
   end;
end;

Open in new window


Can you explain more for the rest of the requirements please?
0
 

Author Comment

by:boycoder
ID: 35460545
Hi mate, that code worksa treat, but how do i only show a particular part of the page?

The part i want to show is the address...  can we cut it all out somehow?

I need:

Richard Hobson
21 thomas Westall Way, testing
North Shields Tyne and Wear N75544
United Kingdom
(0191) 296345563

and

Printer versionBuyer:Member ID techno0techs5tv ( Feedback score of d256) Contact buyer

to show in edit7.text


Skip to main contentBuyMy eBaySellCommunityContact usHelpHello, Simon (emailedxboxlve). Sign outShop now to earn eBay Plus points. 
Enter your search keywordSelect a category for searchAll CategoriesAntiquesArtBabyBooks, Comics & MagazinesBusiness, Office & IndustrialCars, Motorcycles & VehiclesClothes, Shoes & AccessoriesCoinsCollectablesComputingConsumer ElectronicsCraftsDolls & BearsDVD, Film & TVEvents TicketsHealth & BeautyHolidays & TravelHome & GardenJewellery & WatchesMobile & Home PhonesMusicMusical InstrumentsPhotographyPottery, Porcelain & GlassPropertySporting GoodsSports MemorabiliaStampsToys & GamesVehicle Parts & AccessoriesVideo GamesWholesale & Job LotsEverything ElseAdvanced
CATEGORIES FASHIONDAILY DEALS 
Bread Crumb LinkHome > My eBay > Order details
Ad Feedback|AdChoice - opens in a new window or tab



Order details

Shipment details

Delivery details

Richard Hobson
21 thomas Westall Way, testing
North Shields Tyne and Wear N75544
United Kingdom
(0191) 296345563


Payment details



Order details
Item title Available actionsPostage & packaging (estimated delivery*)Price

Printer versionBuyer:Member ID techno0techs5tv ( Feedback score of d256) Contact buyer

Paid on 24-Apr-11 via PayPal



Item title:2100trgfhfgtaph - opens in a new window or tab
Item ID:130510645620417 - Price: £137.49
Quantity:1

Print postage

Other 24 Hour Courier: Free
Estimated delivery: April 27£17.49


Payment instructions:
Please do not email us asking "where is my item" we have live chat or telephone for this, thanks.



Subtotal:£1eee7.49

Postage & packaging:Free

Total:£1766.49













About SSL Certificates

Shop with confidence.  Learn more

Copyright © 1995-2011 eBay Inc. All Rights Reserved. Designated trademarks and brands are the property of their respective owners. Use of this website constitutes acceptance of the eBay User Agreement and Privacy Policy.

PulldownMenu Open Start of layer

PulldownMenu End of layer
Print postageMark as dispatchedView PayPal transaction- opens in a new window or tabView purchased item- opens in a new window or tabContact buyerUnmark as payment receivedSell similar
Popular products




No suggestions.
Hide eBay suggestions

Open in new window

0
 

Author Comment

by:boycoder
ID: 35460561
Printer versionBuyer:Member ID techno0techs5tv ( Feedback score of d256) Contact buyer

needs to be displayed in the edit box as

techno0techs5tv 'has a Feedback score of' d256
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Expert Comment

by:jimyX
ID: 35460614
So you want the lines between "Delivery details" and "Payment details" as well as the line of "Printer versionBuyer:" which are fixed terms, is that so?
0
 

Author Comment

by:boycoder
ID: 35460643
Yea its the same format, prices on that page may change, but the lines will all be the same in number.
0
 

Author Comment

by:boycoder
ID: 35460650
They arnt fixed, they will all change.. but the format is always the same.
0
 
LVL 24

Accepted Solution

by:
jimyX earned 2000 total points
ID: 35460746
What do you mean by the format? Do you mean 'Delivery details', 'Payment details', 'Printer versionBuyer:' and 'Contact buyer' are not a fixed phrases? If they are, then you can use the following code:
procedure TForm1.Button2Click(Sender: TObject);
var
  str:string;
begin
  str:= Memo1.Text;
  if (pos('Delivery details',str) > 0) and (pos('Payment details',str) > 0) then
    begin
      memo2.Text := copy(Str,pos('Delivery details',str)+20,pos('Payment details',str)-pos('Delivery details',str)-25);
    end;
  if (pos('Printer versionBuyer:',str) > 0) and (pos('Contact buyer',str) > 0) then
    begin
      Edit1.Text := copy(Str,pos('Printer versionBuyer:',str)+22,pos('Contact buyer',str)-pos('Printer versionBuyer:',str)-22);
    end;
end;

Open in new window


If not then are you sure that then number of lines are always the same?
0
 

Author Closing Comment

by:boycoder
ID: 35462365
amazing, thanks!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question