Humble Trader

Tuesday, September 05, 2006

Get HTML - get_html_h.sql

-- ------------------------------------------------------------------------- --
-- --
-- Title: get_html_h.sql --
-- Author: Steve Roach --
-- --
-- Description: Container for all procedures and functions relating to --
-- accessing data from remote web pages. --
-- --
-- Procedures: --
-- ------------------------------------------------------------------------ --
-- Procedure: fetch_html - Overload 1 --
-- --
-- Wrapper to do fetch with housekeeping. --
-- --
-- p_web_page IN VARCHAR2 - Local name of the web page to --
-- be accessed. Matches --
-- HTML_PAGES.NAME. --
-- ------------------------------------------------------------------------- --
-- Procedure: fetch_html - Overload 2 --
-- --
-- Fetch web page. --
-- --
-- p_web_page IN VARCHAR2 - Local name of the web page to --
-- be accessed. Matches --
-- HTML_PAGES.NAME. --
-- p_run_no IN NUMBER - Run number of this fetch run. --
-- ------------------------------------------------------------------------- --
-- Procedure: parse_html - Overload 1 --
-- --
-- Wrapper to do parse with housekeeping. --
-- ------------------------------------------------------------------------- --
-- Procedure: parse_html - Overload 2 --
-- --
-- Parse all page accesses with status of 'FETCHED'. --
-- --
-- p_parse_run_no IN NUMBER - Run number of the parse run. --
-- ------------------------------------------------------------------------- --
-- Procedure: parse_html - Overload 3 --
-- --
-- Parse web page. --
-- --
-- p_parse_run_no IN NUMBER - Run number of the parse run. --
-- p_raw_run_no IN NUMBER - Run number of the raw html. --
-- ------------------------------------------------------------------------- --
-- Function: get_scec --
-- --
-- Get character from Special Common Entity Code. --
-- --
-- p_scec IN VARCHAR2 - Special Common Entity Code. --
-- Matches --
-- html_special_entity_codes.special_entity_code. --
-- RETURN VARCHAR2 - Character dereferenced from the --
-- Special Common Entity Code. --
-- ------------------------------------------------------------------------- --
-- Function: replace_scec --
-- --
-- Replace all Special Common Entity Codes in a string. --
-- --
-- p_string IN VARCHAR2 - String to be replaced. --
-- RETURN VARCHAR2 - Replaced string. --
-- ------------------------------------------------------------------------- --
-- History: --
-- --
-- Date Ver Author Description --
-- --------- ----- ------ -------------------------------------------------- --
-- 23-AUG-06 01.00 SRR First release --
-- --
-- ------------------------------------------------------------------------- --

-- Package header definition.
CREATE OR REPLACE PACKAGE get_html
AS
PROCEDURE fetch_html -- Overload 1.
(
p_web_page IN VARCHAR2
);

PROCEDURE fetch_html -- Overload 2.
(
p_web_page IN VARCHAR2
,p_run_no IN NUMBER
);

PROCEDURE parse_html; -- Overload 1.

PROCEDURE parse_html -- Overload 2.
(
p_parse_run_no IN NUMBER
);

PROCEDURE parse_html -- Overload 3.
(
p_parse_run_no IN NUMBER
,p_raw_run_no IN NUMBER
);

FUNCTION get_scec
(
p_scec IN
html_special_entity_codes.special_entity_code%TYPE
)
RETURN VARCHAR2;

FUNCTION replace_scec
(
p_string IN VARCHAR2
)
RETURN VARCHAR2;
END get_html;
/

SHOW ERRORS

0 Comments:

Post a Comment

<< Home