X-0.3.0.0: A light-weight XML library

Copyright(c) Galois Inc. 2007
(c) Herbert Valerio Riedel 2019
LicenseBSD-3-Clause AND GPL-3.0-or-later
Safe HaskellNone
LanguageHaskell2010

Text.XML

Contents

Description

A lightweight XML parsing, filtering and generating library.

This module reexports functions from:

Synopsis

Smart Element node constructor

class Node t where Source #

A smart element constructor which uses the type of its argument to determine what sort of element to make.

Methods

node :: QName -> t -> Element Source #

Instances
Node () Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> () -> Element Source #

Node Text Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> Text -> Element Source #

Node ShortText Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ShortText -> Element Source #

Node CData Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> CData -> Element Source #

Node Attr Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> Attr -> Element Source #

Node Element Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> Element -> Element Source #

Node Content Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> Content -> Element Source #

Node [CData] Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> [CData] -> Element Source #

Node [Attr] Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> [Attr] -> Element Source #

Node [Element] Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> [Element] -> Element Source #

Node [Content] Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> [Content] -> Element Source #

Node ([Attr], [CData]) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], [CData]) -> Element Source #

Node ([Attr], [Element]) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], [Element]) -> Element Source #

Node ([Attr], [Content]) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], [Content]) -> Element Source #

Node ([Attr], Text) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], Text) -> Element Source #

Node ([Attr], ShortText) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], ShortText) -> Element Source #

Node ([Attr], CData) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], CData) -> Element Source #

Node ([Attr], Element) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], Element) -> Element Source #

Node ([Attr], Content) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> ([Attr], Content) -> Element Source #

Node (Attr, Text) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> (Attr, Text) -> Element Source #

Node (Attr, ShortText) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> (Attr, ShortText) -> Element Source #

Node (Attr, CData) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> (Attr, CData) -> Element Source #

Node (Attr, Element) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> (Attr, Element) -> Element Source #

Node (Attr, Content) Source # 
Instance details

Defined in Text.XML

Methods

node :: QName -> (Attr, Content) -> Element Source #

Unqualified names

unqual :: LName -> QName Source #

Create an unqualified name.

unode :: Node t => LName -> t -> Element Source #

Create node with unqualified name

Attribute helpers

add_attr :: Attr -> Element -> Element Source #

Add an attribute to an element.

add_attrs :: [Attr] -> Element -> Element Source #

Add some attributes to an element.

Content conversion/casts

class IsContent x where Source #

Convenience class for converting to/from Content values

Since: 0.3.0

Methods

toContent :: x -> Content Source #

upcast or generalize to Content

fromContent :: Content -> Maybe x Source #

downcast or specialize (if possible) to a specific Content subtype

Reexports