xmljson/element

Types

pub type DecodeError {
  DecodeError(message: String)
}

Constructors

  • DecodeError(message: String)
pub type Element {
  Element(
    name: String,
    attributes: List(#(String, String)),
    text: List(String),
    children: List(Element),
    namespaces: List(#(String, String)),
    inherited_namespaces: List(#(String, String)),
  )
}

Constructors

  • Element(
      name: String,
      attributes: List(#(String, String)),
      text: List(String),
      children: List(Element),
      namespaces: List(#(String, String)),
      inherited_namespaces: List(#(String, String)),
    )

Functions

pub fn from_json(
  json_string: String,
) -> Result(Element, DecodeError)
pub fn from_xml(
  xml_string: String,
) -> Result(Element, DecodeError)
pub fn inherited_namespaces(
  elem: Element,
  data: List(#(String, String)),
) -> Element
pub fn new(name: String) -> Element
pub fn text(elem: Element, data: List(String)) -> Element
pub fn to_json(elem: Element) -> Json
pub fn to_xml(elem: Element) -> String
pub fn to_xml_type(elem: Element) -> Xml
Search Document