---
title: "HTML\u30C6\u30FC\u30D6\u30EB (htmlTable)"
description: "HTML\u5F62\u5F0F\u3067\u683C\u7D0D\u3055\u308C\u305F\uFF08\u53B3\u5BC6\u306A\u69CB\u9020\u3092\u6301\u305F\u306A\u3044\uFF09\u30C7\u30FC\u30BF\u306F\u3001htmltable\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u4F7F\u7528\u3057\u3066\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3068\u3057\u3066\u89E3\u91C8\u3067\u304D\u307E\u3059\u3002"
language: ja
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ja/docs/invantive-universalsql/grammar/data-sources/html-table-htmltable
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/data-sources/html-table-htmltable
updated: 2026-12-04T12:53:17Z
license: https://documentation.invantive.eu/ja/
---

## 目的
HTML形式で格納された（厳密な構造を持たない）データは、htmltableキーワードを使用してデータソースとして解釈できます。

この式は、列の指定を使って行を評価する基準となるマスターパスを指定します。

passingオプションは、HTML形式のデータのソースを指定します。 ソースは多くの場合、read_file() テーブル関数の結果、またはhttpdownload()を使用したURLダウンロードの結果です。 HTML形式に完全に準拠している必要はありません。パーサーは多くの場合、HTML形式の多くのエラーを自動的に修正します。

列は、マスターパスからの相対パスを使用して指定します。

```sql
--
-- Retrieve all anchors from a webpage.
--
select htable.*
from   httpdownload@datadictionary('https://www.invantive.com') dld
join   htmltable
( '//a'
passing dld.content_clob
columns href  varchar2 path '@href'
,       rel   varchar2 path '@rel'
,       title varchar2 path '@title'
)
htable
```

## 構文

```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart TD
    htmlTableSpec_start((START))
    htmlTableSpec_start --> htmlTableSpec_0_0[HTMLTABLE]:::quoted
    htmlTableSpec_0_0 --> htmlTableSpec_0_1["("]:::quoted
    htmlTableSpec_0_1 --> htmlTableSpec_0_2[htmlTableExpression]
    htmlTableSpec_0_2 --> htmlTableSpec_0_3[htmlTablePassing]
    htmlTableSpec_0_3 --> htmlTableSpec_0_4[htmlTableLiteral]
    htmlTableSpec_0_4 --> htmlTableSpec_0_5[htmlTableColumns]
    htmlTableSpec_0_5 --> htmlTableSpec_0_6[")"]:::quoted
    htmlTableSpec_0_6 --> htmlTableSpec_end((END))
```

## htmlTableLiteral

```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    htmlTableLiteral_start((START))
    htmlTableLiteral_start --> htmlTableLiteral_0_0[LITERAL]:::quoted
    htmlTableLiteral_0_0 --> htmlTableLiteral_0_1[<a href="Invantive UniversalSQL/Grammar/Expression" class="internal-link">expression</a>]
    htmlTableLiteral_0_1 --> htmlTableLiteral_end((END))
```

## htmlTablePassing

```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> htmlTablePassing
    htmlTablePassing -->| | passingSourceOrPathExpression
    passingSourceOrPathExpression --> End((END))
```

## htmlTableExpression

```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> htmlTableExpression
    htmlTableExpression -->| | stringConstant
    stringConstant --> End((END))
```

## htmlTableColumns

```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart TD
    htmlTableColumns_start((START))
    htmlTableColumns_start --> htmlTableColumns_0_0["COLUMNS"]:::quoted
    htmlTableColumns_0_0 --> htmlTableColumns_0_1[htmlTableColumnSpec]
    htmlTableColumns_0_1 --> htmlTableColumns_0_2[","]:::quoted
    htmlTableColumns_0_2 --> htmlTableColumns_0_3[htmlTableColumnSpec]
    htmlTableColumns_0_3 --> htmlTableColumns_end((END))
```

## 目的

HTMLテーブル列の指定のリスト。

## htmlTableColumnSpec

```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart TD
    htmlTableColumnSpec_start((START))
    htmlTableColumnSpec_start --> htmlTableColumnSpec_0_0[<a href="Invantive UniversalSQL/Grammar/Identifier" class="internal-link">identifier</a>]
    htmlTableColumnSpec_0_0 --> htmlTableColumnSpec_0_1[sqlDataTypeExtended]
    htmlTableColumnSpec_0_1 --> htmlTableColumnSpec_0_2[PATH]:::quoted
    htmlTableColumnSpec_0_2 --> htmlTableColumnSpec_0_3[stringConstant]
    htmlTableColumnSpec_0_3 --> htmlTableColumnSpec_end((END))
```

## 目的
各HTMLテーブル列は、マスターパスからの相対パスを使用して、データソースの列にマッピングされます。

