elements

Types

pub type Attribute {
  Attribute(key: String, value: String)
}

Constructors

  • Attribute(key: String, value: String)
pub type Element {
  Element(
    tag: String,
    attrs: List(Attribute),
    children: List(Element),
  )
  EscapeText(String)
  Text(String)
  CData(String)
}

Constructors

  • Element(
      tag: String,
      attrs: List(Attribute),
      children: List(Element),
    )
  • EscapeText(String)
  • Text(String)
  • CData(String)

Functions

pub fn attr(key: String, value: String) -> Attribute
pub fn cdata(value: String) -> Element
pub fn element(
  tag: String,
  attrs: List(Attribute),
  children: List(Element),
) -> Element
pub fn element_self_closing(
  tag: String,
  attrs: List(Attribute),
) -> Element
pub fn escape_text(value: String) -> Element
pub fn text(value: String) -> Element
Search Document