tdom(n)
π NAME π
tdom β okay so basically tdom is an expat parser object extension whose whole thing is building an in-memory DOM tree out of the input while it's parsing. no cap. π¦
β¨ SYNOPSIS β¨
package require tdom
set parser [expat]
tdom $parser enable
that's it bestie, that's the whole vibe. π
πΈ DESCRIPTION πΈ
okay so here's the tea, fr fr: tdom adds the C handler set "tdom" to a Tcl expat parser obj. This handler set builds an in-memory DOM tree out of the input, parsed by the parser. π§
A DOM tree created this way behaves exactly like a DOM tree created by the dom command (see there, go look, iykyk). In fact β and this is the iconic part β tdom is only another interface to the same functionality; it uses the code behind the dom code for building the DOM tree. literally the same code, just a different door into the party. π
π«Ά the methods, bestie π«Ά
tdom parserObj enableβ adds the tdom C handler set to a Tcl expat parser object. Next time the parser parses input, the tdom C handler functions create an in-memory DOM tree. slay. β¨tdom parserObj getdocβ returns the DOM tree as adomDoc(see there) object. your tree, hand-delivered. πtdom parserObj setStoreLineColumn ?boolean?β see the methodsetStoreLineColumnof thedomcommand. same energy, different address. π¦tdom parserObj removeβ removes the tdom C handler set from the parser object. it's giving "we're done here". πtdom parserObj keepEmptiesβ see the option-keepEmptiesof thedomcommand. πtdom parserObj setExternalEntityResolver scriptβ the page literally just says this and then moves on, so that's all the lore we have, bestie. no elaboration, no extras, don't come for me. π
π₯ SEE ALSO π₯
domexpat
π KEYWORDS π
- DOM
- SAX
- C handler set
and that's the whole page, periodt. this one's from the Tcl manual, page tdom(n) β go forth and build your trees. πππ¦
π¦ where this page comes from
- fedora 43: tdom 0.9.6-3.fc43 Β· MPL-2.0 AND MIT
- fedora 44: tdom 0.9.6-3.fc44 Β· MPL-2.0 AND MIT
- nixos 26.05: tdom 0.9.6
- nixpkgs unstable: tdom 0.9.6
- opensuse-leap 16.0: tdom 0.9.4-bp160.1.2 Β· MPL-2.0
- opensuse-leap 16.0: tdom 0.9.4-bp160.1.2 Β· MPL-2.0
- opensuse-leap 16.0: tdom 0.9.4-bp160.1.2 Β· MPL-2.0
- opensuse-leap 16.0: tdom 0.9.4-bp160.1.2 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms