This project is read-only.



This module contains types and functions for constructing an xml representation using a light domain specific language.
(@=) : XmlName → string → XmlAttribute
Create an attribute by supplying a name and value.
attribs : list<XmlAttribute> → XmlElement XmlElement
Add attributes to an element by supplying a list of attributes.
content : list<XmlElement> → XmlElement XmlElement
Set the content of an element by supplying a list of elements.
elem : XmlNameXmlElement
Create an empty element by supplying a name
name : string → XmlName
Name an attribute or element.
qname : string → string → XmlName
Name an attribute or element with a qualified name.
value : string → XmlElementXmlElement
Set the value of an element by supplying a string value.


Represents an XML attribute.
type XmlAttribute =
        Name: XmlName
        Value: string


Represents an XML element.
type XmlElement =
        Name: XmlName
        Attributes: list<XmlAttribute>
        Content: XmlElementContent


Represents XML element content.
type XmlElementContent =
    | Empty     
    | Value of string     
    | Content of list<XmlElement>    


Represents XML markup.
type XmlMarkup =
    | Element of XmlElement    
    | Attribute of XmlAttribute    


Represents the name of nameable markup.
type XmlName =
    | Name of string    
    | QualifiedName of string * string

Last edited Mar 16, 2012 at 2:47 PM by huwman, version 1


No comments yet.