xml
Simple XML Parser (SAX-style events)
Functions
| Function | Description |
|---|---|
_xml_byte_at | Internal byte reader. |
_xml_copy | Internal: copy bytes. |
_xml_add_evt | Internal: add event. |
_xml_tag_name_end | Internal: find end of tag name (space or > or /). |
_xml_find_lt | Internal: find ‘<’ from pos. |
_xml_find_gt | Internal: find ‘>’ from pos. |
_xml_skip_comment | Internal: skip comment . Returns position after –>. |
_xml_skip_pi | Internal: skip PI . Returns position after ?>. |
_xml_process_tag | Internal: process a tag starting at ‘<’. Returns new pos. |
xml_parse | Parse XML buffer into events. |
xml_event_count | Return event count. |
xml_event_type | Return event type at index. |
xml_event_name | Copy event name/text to out. Return length. |
xml_event_text | Copy event text to out. Return length. |
xml_escape | Escape XML special chars: & < > " ' |
_xml_check_lt | Internal: check 3-char entity after &. |
_xml_check_gt | |
_xml_check_amp | |
_xml_check_quot | |
_xml_check_apos | |
xml_unescape | Unescape XML entities: & < > " ' |
Details
_xml_byte_at
fn _xml_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader.
_xml_copy
fn _xml_copy(dst: &i8, doff: i64, src: &i8, soff: i64, n: i64) -> i64Internal: copy bytes.
_xml_add_evt
fn _xml_add_evt(h: &i64, typ: i64, off: i64, ln: i64) -> i64Internal: add event.
_xml_tag_name_end
fn _xml_tag_name_end(data: &i8, start: i64, limit: i64) -> i64Internal: find end of tag name (space or > or /).
_xml_find_lt
fn _xml_find_lt(data: &i8, pos: i64, len: i64) -> i64Internal: find ‘<’ from pos.
_xml_find_gt
fn _xml_find_gt(data: &i8, pos: i64, len: i64) -> i64Internal: find ‘>’ from pos.
_xml_skip_comment
fn _xml_skip_comment(data: &i8, pos: i64, len: i64) -> i64Internal: skip comment . Returns position after –>.
_xml_skip_pi
fn _xml_skip_pi(data: &i8, pos: i64, len: i64) -> i64Internal: skip PI . Returns position after ?>.
_xml_process_tag
fn _xml_process_tag(h: &i64, data: &i8, pos: i64, len: i64) -> i64Internal: process a tag starting at ‘<’. Returns new pos.
xml_parse
fn xml_parse(buf: &i8, len: i64) -> &i64Parse XML buffer into events.
xml_event_count
fn xml_event_count(h: &i64) -> i64Return event count.
xml_event_type
fn xml_event_type(h: &i64, idx: i64) -> i64Return event type at index.
xml_event_name
fn xml_event_name(h: &i64, idx: i64, out: &i8) -> i64Copy event name/text to out. Return length.
xml_event_text
fn xml_event_text(h: &i64, idx: i64, out: &i8) -> i64Copy event text to out. Return length.
xml_escape
fn xml_escape(buf: &i8, len: i64, out: &i8) -> i64Escape XML special chars: & < > " '
_xml_check_lt
fn _xml_check_lt(buf: &i8, i: i64) -> i64Internal: check 3-char entity after &.
_xml_check_gt
fn _xml_check_gt(buf: &i8, i: i64) -> i64_xml_check_amp
fn _xml_check_amp(buf: &i8, i: i64) -> i64_xml_check_quot
fn _xml_check_quot(buf: &i8, i: i64) -> i64_xml_check_apos
fn _xml_check_apos(buf: &i8, i: i64) -> i64xml_unescape
fn xml_unescape(buf: &i8, len: i64, out: &i8) -> i64Unescape XML entities: & < > " '