HTMLelement input?

Hello.

Had HTML page that contain this input <input type="submit" value="Ok" class="button"> how to get the type member of this item? in Delphi this will be like this:
1
2
3
4
5
6
7
8
9
10
procedure TForm1.Button2Click(Sender: TObject);
var
doc:variant;
i:integer;
begin
doc:=webbrowser1.Document as IHtmlDocument2;
for i:=0 to doc.all.tags('input').length-1 do begin
if doc.all.tags('input').item(i).type='submit' then showmessage(doc.all.tags('input').item(i).type);
end;
end;
The message box will show - submit. Can someone help translate this to C++ please?
There is no inbuilt HTML support in C++, you would have to use a third party library that provides such functionality.
Why do you want to do that with C++?
Just try to learn this language actually i don't care which C-like language to use which one do you suggest? Mainly for parsing Html pages?
I have never done that, but I'd use Perl or Python instead. I don't think they're C-like in the way you mean, though.
There is no inbuilt HTML support in C++, you would have to use a third party library that provides such functionality.


Ok, what library you talking about? Thanks
There are two complementary aspects to web programming: rendering HTML including forms, and processing the HTTP PUT and GET requests (typically via CGI). C++ does not provide support for either in the standard library. You will need to find a library that does this. There are many of them. You might have a look at GNU cgicc, a C++ library for CGI programming.

http://www.gnu.org/software/cgicc/

If you don't like that one, just Google for "C++ CGI library" and you'll find others.
Thanks!
Topic archived. No new replies allowed.