BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Post an xml file to a webpage

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML
View previous topic :: View next topic  
Author Message
tBS
Guest





PostPosted: Mon Jan 02, 2006 4:51 am    Post subject: Post an xml file to a webpage Reply with quote



I need programmatically set a form variable called RxInput with the XML file
I would like to pass to
https://secure.newcropaccounts.com/InterfaceV6/RxEntry.aspx

is it possible to do it by using TWebBrowser or I have to use IdHttp?
I need some explanations on this please!


Back to top
tBS
Guest





PostPosted: Mon Jan 02, 2006 7:22 am    Post subject: Re: Post an xml file to a webpage Reply with quote



I figured that out, here is my code:


var
strData : widestring;
PostData: OleVariant;
Headers: OleVariant;
i : integer;

strData:='RxInput=<?xml version="1.0" encoding="utf-8"?>'+ #10#13 +
..
..
..
PostData := VarArrayCreate([0, Length(strData) - 1], varByte);
for i := 1 to Length(strData) do PostData[i-1] := Ord(strData[i]);
Headers := 'Content-Type: application/x-www-form-urlencoded' + #10#13;

WebBrowser1.Navigate('https://secure.website.com/index.aspx?', EmptyParam,
EmptyParam, PostData, Headers);


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.