package stk_xml

  1. Overview
  2. Docs

Module Stk_xml.ViewSource

XML view widget.

This widget allows to display a XML document, using other Stk widgets.

It can handle styling with CSS, use remote resources if a load_resource function is provided, add event handlers on created widgets according to CSS selectors (see Eprops).

One can also provide a function to handle some XML nodes and change the widgets used to display these nodes (with method View.xmlview.set_of_node, see Layout.)

Properties

Property to store XML document.

Sourceval prop_iri : Types.PIri.t Stk__Props.prop

Property to store IRI.

Events

Sourcetype Stk.Events.ev +=
  1. | Doc_updated : (unit -> unit) Stk.Events.ev

Widget

Sourceclass xmlview : ?classes:string list option -> ?name:string option -> ?props:Stk.Props.t option -> ?wdata: Stk.Widget.wdata option -> ?load_resource:Types.load_resource option -> ?style:Style.style option -> unit -> object ... end

The xmlview widget, with kind "xmlview".

Sourceval xmlview : ?classes:string list -> ?name:string -> ?props:Stk.Props.t -> ?wdata:Stk.Widget.wdata -> ?load_resource:Types.load_resource -> ?style:Style.style -> ?pack:(Stk.Widget.widget -> unit) -> unit -> xmlview

Use this function to create a xmlview widget.