Class MarkupParser

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.glib.MarkupParser
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class MarkupParser extends ProxyInstance

Any of the fields in GMarkupParser can be null, in which case they will be ignored. Except for the error function, any of these callbacks can set an error; in particular the MarkupError.UNKNOWN_ELEMENT, MarkupError.UNKNOWN_ATTRIBUTE, and MarkupError.INVALID_CONTENT errors are intended to be set from these callbacks. If you set an error from a callback, g_markup_parse_context_parse() will report that error back to its caller.

Refer to the GMarkup documentation to understand the scope and limitations of GMarkupParser. In particular, it is not a full XML parser and it must not be used to process untrusted data.

  • Constructor Details

    • MarkupParser

      public MarkupParser(MemorySegment address)
      Create a MarkupParser proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • MarkupParser

      public MarkupParser(Arena arena)
      Allocate a new MarkupParser.
      Parameters:
      arena - to control the memory allocation scope
    • MarkupParser

      public MarkupParser()
      Allocate a new MarkupParser. The memory is allocated with Arena.ofAuto().
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • overrideStartElement

      public void overrideStartElement(MarkupParser.StartElementCallback startElement, Arena _arena)
      Write a value in the field start_element.
      Parameters:
      startElement - The new value for the field start_element
      _arena - to control the memory allocation scope
    • overrideEndElement

      public void overrideEndElement(MarkupParser.EndElementCallback endElement, Arena _arena)
      Write a value in the field end_element.
      Parameters:
      endElement - The new value for the field end_element
      _arena - to control the memory allocation scope
    • overrideText

      public void overrideText(MarkupParser.TextCallback text, Arena _arena)
      Write a value in the field text.
      Parameters:
      text - The new value for the field text
      _arena - to control the memory allocation scope
    • overridePassthrough

      public void overridePassthrough(MarkupParser.PassthroughCallback passthrough, Arena _arena)
      Write a value in the field passthrough.
      Parameters:
      passthrough - The new value for the field passthrough
      _arena - to control the memory allocation scope
    • overrideError

      public void overrideError(MarkupParser.ErrorCallback error, Arena _arena)
      Write a value in the field error.
      Parameters:
      error - The new value for the field error
      _arena - to control the memory allocation scope