GumboElement(3)

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

πŸ’– GumboElement πŸ’– (NAME)

okay bestie, welcome to GumboElement β€” it's a manual page from the Gumbo docs (section 3, the library-call girlies πŸŽ€). This is the struct, the main character, the blueprint. Let's get into it ✨


✨ SYNOPSIS ✨

to even look at this thing you gotta pull it in like:

#include <gumbo.h>

🌸 Data Fields 🌸

here's the whole squad, no gatekeeping:

  • GumboVector children
  • GumboTag tag
  • GumboNamespaceEnum tag_namespace
  • GumboStringPiece original_tag
  • GumboStringPiece original_end_tag
  • GumboSourcePosition start_pos
  • GumboSourcePosition end_pos
  • GumboVector attributes

πŸ¦‹ Detailed Description πŸ¦‹

so <pink>GumboElement</pink> is literally the struct that represents all HTML elements πŸ‘‘ it's giving "everything you ever wanted to know about a tag." It carries the info about the tag, the attributes, and the child nodes. that's the whole vibe, periodt.


πŸ’… Field Documentation πŸ’…

GumboVector GumboElement::children

an array of GumboNodes holding all the children of this element 🫢 and yes, the pointers are owned β€” you're responsible for them, bestie, no abandoning them.

GumboTag GumboElement::tag

the GumboTag enum for this element. that's it, that's the field ✨

GumboNamespaceEnum GumboElement::tag_namespace

the GumboNamespaceEnum for this element. namespace check, vibe check, same thing πŸ’…

GumboStringPiece GumboElement::original_tag

a GumboStringPiece pointing at the original tag text for this element β€” and it points directly into the source buffer, no copies, we're efficient here. but heads up: if the tag was inserted algorithmically (for example, <head> or insertion), this will be a zero-length string. don't come for me, that's just how it is 😭

GumboStringPiece GumboElement::original_end_tag

a GumboStringPiece pointing at the original end tag text for this element. same deal: if the end tag got inserted algorithmically (for example, closing a self-closing tag), it's a zero-length string πŸ™ˆ

GumboSourcePosition GumboElement::start_pos

the source position for the start of the start tag. yes, start of the start. iconic, honestly.

GumboSourcePosition GumboElement::end_pos

the source position for the start of the end tag. not the end of the end tag β€” the start of it. noted πŸŽ€

GumboVector GumboElement::attributes

an array of GumboAttributes with the attributes for this tag, in the exact order that they were parsed (we respect the timeline ⏳). and yep β€” the pointers are owned here too. take care of your babies.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Gumbo from the source code. (not me, I'm just the messenger πŸ’€)


okay that's the whole page, no skips, no skimming, we read every line like good students 🧚

and that's a wrap, bestie πŸ’– this was GumboElement(3), from Version 0.12.1, dated Fri Sep 19 2025 00:00:00. slay, go build something iconic with it 🌈⭐

πŸ“¦ where this page comes from