Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
text.c File Reference

VM opcode snippet for retrieving the concatenated text of an XML node. More...

Go to the source code of this file.

Functions

 free_value (drop)
 push_value (vm, make_string(""))

Variables

case OP_XML_TEXT
 break

Detailed Description

VM opcode snippet for retrieving the concatenated text of an XML node.

Included by vm.c; implements OP_XML_TEXT.

Opcode: OP_XML_TEXT

  • Stack effect: pop (int node_handle) → push (string text)
  • Behavior: Retrieves the node's textual content as produced by xmlNodeGetContent(), which concatenates all descendant text nodes. If the node is invalid or has no textual content, an empty string is pushed.
  • Gating: If FUN_WITH_XML2 is disabled, the input is discarded and an empty string is pushed.

Notes

  • The returned string is copied into a VM string value; libxml2 buffers are freed immediately after use.

Example // stack: [ node_handle ] OP_XML_TEXT // → [ "Hello world" ]

Definition in file text.c.

Function Documentation

◆ free_value()

free_value(drop)

◆ push_value()

push_value(vm,
make_string("") )

Variable Documentation

◆ break

break

Definition at line 56 of file text.c.

◆ OP_XML_TEXT

case OP_XML_TEXT

Definition at line 34 of file text.c.