tdom(3tcl)

okay so bestie, welcome to tdom(3tcl) β€” it's giving expat parser object extension, and it's here to build an in-memory DOM tree while parsing. No cap. πŸ’…βœ¨


✨ NAME ✨

tdom β€” it's an expat parser object extension to create an in-memory DOM tree from the input while parsing. That's the whole main character energy right there. πŸŒˆπŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

package require tdom

set parser [expat]

tdom $parser enable

🌸 DESCRIPTION 🌸

tdom adds the C handler set "tdom" to an 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 behave exactly like a DOM tree created by the "dom" command (see there). In fact, tdom is only another interface to the same functionality; it uses the code behind the dom code for building the DOM tree. Periodt. πŸ’–

Here's the subcommand lineup, 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. πŸ”₯
  • tdom parserObj getdoc β€” Returns the DOM tree as domDoc (see there) object. πŸ‘‘
  • tdom parserObj setStoreLineColumn ?boolean? β€” See the method setStoreLineColumn of the dom command. πŸŽ€
  • tdom parserObj remove β€” Removes the tdom C handler set from the parser object. 🧹
  • tdom parserObj keepEmpties β€” See the option -keepEmpties of the dom command. 🌸
  • tdom parserObj setExternalEntityResolver script β€” the original page doesn't describe this one, so I'm not gonna make anything up. It's just listed, exactly like this. πŸ’€πŸ«Ά

πŸ¦‹ SEE ALSO πŸ¦‹

dom, expat


πŸ‘‘ KEYWORDS πŸ‘‘

DOM, SAX, C handler set


And that's the footer tea: source is Tcl, manual is tdom(3tcl) β€” no date on this one, so I'm not inventing one. Byeeee, go parse something cute. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from