code wiki / _hdl_build / nx_html_table.nx
nx_html_table.nx
buildroot/runtime/_hdl_build/nx_html_table.nx
about
nx_html_table.nx -- SOVEREIGN HTML TABLE extractor: the reusable "access it properly" rung for ingesting
tabular data from any science body's HTML (CIAAW, NIST, BIPM, ...) WITHOUT grep -- it parses the table
STRUCTURE (rows x cells) and decodes entities through the proven nx_html_decode_entities. Composes the
existing sovereign HTML stack; hardware-rung-up (fetch[TLS]->tokenize->THIS->typed-extract->seg_store).
API (reusable):
ht_find_open(html, n, pos, tag) -> index of next "<tag" (case-insens, tag-boundary checked), -1
ht_next_row(html, n, pos, rs_out, re_out) -> content [rs,re) of the next <tr>; returns next-pos or -1
ht_cell(html, rs, re, col, out, cap) -> extract the col-th <td> cell as clean text (tags stripped,
entities decoded). 1 found / 0 absent.
No JS, no 3rd-party parser. license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_html_entities.nx
imported by: nx_ciaaw_ingest.nxnx_html_table_gate.nx
structs
| none |
consts
| none |
functions
| 15 | func ht_lc(b: u8) -> u8 { if b >= (65 as u8) { if b <= (90 as u8) { return (b + 32) as u8 } } return b } |
| 18 | func ht_is_open(html: *u8, n: i64, p: i64, tag: *u8) -> i64 |
| 37 | func ht_find_open(html: *u8, n: i64, pos: i64, tag: *u8) -> i64 |
| 43 | func ht_find_close(html: *u8, n: i64, pos: i64, tag: *u8) -> i64 |
| 60 | func ht_after_gt(html: *u8, n: i64, pos: i64) -> i64 |
| 67 | func ht_text(html: *u8, a: i64, b: i64, out: *u8, cap: i64) -> i64 |
| 82 | func ht_cell(html: *u8, rs: i64, re: i64, col: i64, out: *u8, cap: i64) -> i64 |
| 99 | func ht_next_row(html: *u8, n: i64, pos: i64, rs_out: *i64, re_out: *i64) -> i64 |