@@ -35,7 +35,7 @@ module HtmlElements =
3535 | KeyValue of string * string
3636 | Boolean of string
3737
38- type XmlElement = string * XmlAttribute[] // Name * XML attributes
38+ type XmlElement = ( struct ( string * XmlAttribute list )) // Name * XML attributes
3939
4040 type XmlNode =
4141 | ParentNode of XmlElement * XmlNode list // An XML element which contains nested XML elements
@@ -58,11 +58,11 @@ module HtmlElements =
5858 let tag ( tagName : string )
5959 ( attributes : XmlAttribute list )
6060 ( contents : XmlNode list ) =
61- ParentNode (( tagName, Array.ofList attributes), contents)
61+ ParentNode (( tagName, attributes), contents)
6262
6363 let voidTag ( tagName : string )
6464 ( attributes : XmlAttribute list ) =
65- VoidElement ( tagName, Array.ofList attributes)
65+ VoidElement ( tagName, attributes)
6666
6767 /// <summary >
6868 ///
@@ -554,21 +554,21 @@ module internal ViewBuilder =
554554
555555 let rec internal buildNode ( isHtml : bool ) ( sb : StringBuilder ) ( node : XmlNode ) : unit =
556556
557- let buildElement closingBracket ( elemName , attributes : XmlAttribute array ) =
557+ let buildElement closingBracket struct ( elemName , attributes : XmlAttribute list ) =
558558 match attributes with
559- | [|| ] -> do sb += " <" += elemName +! closingBracket
559+ | [] -> do sb += " <" += elemName +! closingBracket
560560 | _ ->
561561 do sb += " <" +! elemName
562562
563563 attributes
564- |> Array .iter ( fun attr ->
564+ |> List .iter ( fun attr ->
565565 match attr with
566566 | KeyValue ( k, v) -> do sb += " " += k += " =\" " += v +! " \" "
567567 | Boolean k -> do sb += " " +! k)
568568
569569 do sb +! closingBracket
570570
571- let inline buildParentNode ( elemName , attributes : XmlAttribute array ) ( nodes : XmlNode list ) =
571+ let inline buildParentNode struct ( elemName , attributes : XmlAttribute list ) ( nodes : XmlNode list ) =
572572 do buildElement " >" ( elemName, attributes)
573573 for node in nodes do buildNode isHtml sb node
574574 do sb += " </" += elemName +! " >"
0 commit comments