Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Задача 9 -----------------------------------------
- toAttributes :: [String] -> Attributes
- toAttributes [] = []
- toAttributes [_] = error "Bad data for toAttributes"
- toAttributes (name:value:ect) = (name, value):(toAttributes ect)
- parseAttributes :: String -> (Attributes, String)
- -- Передумова: Рядок, що містить XML-атрибути, синтаксично вірний
- parseAttributes str = (\(a1, a2) -> (toAttributes (filter (\x -> x /= "") (splitOneOf " =\"" a1)), drop 1 a2)) (break ('>' ==) str)
- With no comments
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement