plsql 程序将 html 保存在表中

问题描述 投票:0回答:1

是否可以创建一个plsql过程来将HTML网页的返回保存在oracle表中?

目前我需要一个根据插入的 url 返回 html 并将其保存在 oracle 表中的过程

谢谢大家

oracle plsql procedure
1个回答
0
投票

当然有可能。这是使用 APEX_

的示例
declare
    l_clob      CLOB;
BEGIN
 
    l_clob := apex_web_service.make_rest_request(
        p_url => 'https://apex.oracle.com',
        p_http_method => 'GET');
    dbms_output.put_line(dbms_lob.substr(l_clob,1000,1));
END
/

<!DOCTYPE html>
<html class="no-js" itemscope="itemscope" itemtype="http://schema.org/WebPage" lang="en" data-base-path="../en/">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />

  <title>Oracle APEX</title>

  <meta name="title" itemprop="name" content="Oracle APEX" />
  <meta name="description" itemprop="description" content="Oracle APEX is the world's most popular enterprise low-code application platform that enables you to build scalable, secure web and mobile apps, with world-class features, that can be deployed anywhere – cloud or on premises." />
  <meta name="keywords" content="Oracle APEX, oracle database, low code, application development, app dev, platform, enterprise, " />
  <meta name="updated" content="01-AUG-2024 14:22:04" />
  <meta name="version" content="398" />

  
  <meta name="twitter:card" content="summary" />
  <meta name="twitter:

Statement processed.

但是,需要在数据库中设置正确的访问控制列表。默认情况下,出于安全原因,不允许执行任何操作。另外,对于任何https站点,都需要将站点证书上传到数据库钱包中。蒂姆·霍尔(Tim Hall)对此有一篇出色的文章

© www.soinside.com 2019 - 2024. All rights reserved.