{-# LANGUAGE OverloadedStrings #-} module Tests.DataForms where import Network.Xmpp.Xep.DataForms import qualified Data.Text.Lazy as TL import qualified Text.XML.Stream.Elements as Elements import qualified Data.XML.Types as XML import Data.XML.Pickle exampleXML1 = TL.concat $ ["" ,"Bot Configuration" ,"Fill out this form to configure your new bot!" ,"" ,"jabber:bot" ,"" ,"Section 1: Bot Info" ,"" ,"" ,"" ,"" ,"" ,"" ,"Section 2: Features" ,"" ,"" ,"" ,"" ,"" ,"" ,"news" ,"search" ,"" ,"Section 3: Subscriber List" ,"" ,"20" ,"" ,"" ,"" ,"" ,"" ,"" ,"" ,"Section 4: Invitations" ,"" ,"Tell all your friends about your new bot!" ,"" ,""] exampleXml2 = TL.concat [ " " ," " ," jabber:bot" ," " ," " ," The Jabber Google Bot" ," " ," " ," This bot enables you to send requests to" ," Google and receive the search results right" ," in your Jabber client. It' really cool!" ," It even supports Google News!" ," " ," " ," 0" ," " ," " ," v3r0na" ," " ," " ," news" ," search" ," " ," " ," 50" ," " ," " ," juliet@capulet.com" ," benvolio@montague.net" ," " ," "] exampleXml3 = TL.concat [ " " , " " , " jabber:bot" , " " , " " , " The Jabber Google Bot" , " " , " " , " 0" , " " , " " , " v3r0na" , " " , " " , " news" , " search" , " " , " " , " 50" , " " , " " , " juliet@capulet.com" , " benvolio@montague.net" , " " , " "] parseForm = unpickleTree (xpRoot xpForm) . XML.NodeElement . Elements.parseElement