tdom(n)

πŸ“¦
version 0.9.6 Β· 2 versions
  • 0.9.6 Β· fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0 (latest)
  • 0.8.2 Β· fedora 43
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– 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 a domDoc (see there) object. your tree, hand-delivered. πŸ‘‘
  • tdom parserObj setStoreLineColumn ?boolean? β€” see the method setStoreLineColumn of the dom command. 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 -keepEmpties of the dom command. πŸ“
  • 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 πŸ”₯

  • dom
  • expat

πŸ‘‘ 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