Query XML file and display within HTML

jomo

Usenet Archive
Joined
Dec 31, 2004
Messages
4
Reaction score
0
Hi,

I need some technical help.

How do I generate a request from an HTML search form (or button/hyperlink) to search/query an XML data file, using CGI scripts, and have the results displayed within an HTML page?
Thanks in advance,

Jomo
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
How do I generate a request from an HTML search form (or button/hyperlink) to search/query an XML data file, using CGI scripts, and have the results displayed within an HTML page?

A HTML form allows you to make a HTTP request (usually either a GET request where the arg=value data pairs are submitted as part of the URL or a POST request where the arg=value data pairs are submitted as the request body). You CGI script (set as <form action="whatever.cgi" ...> ) then has (language dependent) means to read out the submitted data (e.g. $_GET $_POST in PHP) and then all you need to know how to query an XML file in the server side language of your choice. How you extract data from the XML and transform it to HTML might also depend on the server side environment you use, XSLT is a nice way to do that.

I think you are better off to ask in a group about the server side language you use (e.g. PHP or Perl or Java) on how to solve the task, of course after checking available documentation
 

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
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top