GumboNode(3)

πŸ“¦
version 0.12.1 Β· 4 versions
, in fedora 43

πŸ’– GumboNode(3) πŸ’–

okay bestie, welcome to the GumboNode page β€” it's from the Gumbo manual and it is the glow-up moment of the C HTML parsing world, no cap. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

GumboNode β€” the main character struct of the whole tree. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <gumbo.h>

πŸŽ€ Data Fields πŸŽ€

  • GumboNodeType type
  • GumboNode * parent
  • size_t index_within_parent
  • GumboParseFlags parse_flags
  • union {
    • GumboDocument document
    • GumboElement element
    • GumboText text
  • } v

πŸ¦‹ Detailed Description πŸ¦‹

so basically it's a supertype for GumboElement and GumboText, which means we can drop one generic type into lists of children and cast it to whatever subtype we actually need. versatile queen behavior, honestly. πŸ’…

it's also a forward declaration of GumboNode itself so it can be used recursively in GumboNode.parent β€” yes, a struct that contains a pointer to itself. iconic. self-referential and thriving. πŸŒ€


🌈 Field Documentation 🌈

⭐ GumboNodeType GumboNode::type

The type of node that this is. simple as that, bestie.

πŸ’œ GumboNode* GumboNode::parent

Pointer back to the parent node. Not owned. so like… you do not get to free it, it's not yours, hands off. πŸ™ˆ

🧚 size_t GumboNode::index_within_parent

The index within the parent's children vector of this node. basically its spot in the lineup. 🌸

πŸ”₯ GumboParseFlags GumboNode::parse_flags

A bitvector of flags holding info about why this element got inserted into the parse tree, including a whole bunch of special parse situations. it's giving receipts for the parser's decisions. πŸ“‹βœ¨

πŸ‘‘ union { ... } GumboNode::v

The actual node data. the real content, the inner truth, the whole point of the thing. 🫢


🌟 Author 🌟

Generated automatically by Doxygen for Gumbo from the source code. (not a human author, just a robot doing its little thing, and honestly? ate. πŸ€–πŸ’–)


and that's the whole page, bestie! version 0.12.1, dated Fri Sep 19 2025 00:00:00, filed under GumboNode(3) in the Gumbo manual. go forth and parse responsibly. periodt. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from