HTQL - the Hyper-Text Query Language

Forum



What is HTQL

Hyper-Text Query Language (HTQL) is a language for the querying and transformation of HTML, XML and plain text documents. HTQL is developed in C++ with fast and efficient data extraction algorithms. HTQL provides a COM interface for use in JavaScript, Visual Basic, and ASP applications. HTQL can be used to:
  1. Extract HTML elements from HTML pages
  2. Retrieve HTML page through HTTP protocol
  3. Update HTML pages from applications

Installation

  1. Download the HtqlCom.dll into a local directory, such as 'C:\htql\'.
  2. Register the "HtqlCom.dll" by running:
    C:\htql\> regsvr32 HtqlCom.dll

Manual

Demonstrating Examples

The following example shows the use of HTQL in an HTML page with JavaScript. The JavaScript code in this HTML page retrieves the first <a> tag from http://www.ncbi.nlm.nih.gov/ and show it in the HTML body.

<!--- test.html -->
<html> <base href="http://www.ncbi.nlm.nih.gov/">
<body>
<script language=JavaScript>
	var a= new ActiveXObject("HtqlCom.HtqlControl");
	a.setUrl("http://www.ncbi.nlm.nih.gov/");
	a.setQuery("<a>");
	document.write(a.getValueByIndex(1));
</script>
</body>
</html>

The following Visual Basic example does the same thing and shows the result in a message box:

' VB example
Dim a As Object
Set a = CreateObject("HtqlCom.HtqlControl")
i = a.setUrl("http://www.ncbi.nlm.nih.gov/")
i = a.setQuery("<a>")
MsgBox (a.getValueByIndex(1))

Applications Using HTQL

Citation