
Hi, I am trying to read a very simple xml node containing a list of other xml nodes into a data structure. Running the code yields : fatal error: document unpickling failed xpCheckEmptyContents: unprocessed XML content detected context: element "animelist" contents: <title>Bleach</title> <title>Naruto</title> Can you help me debug this ? The code and xml are below : 8<---Code--------------------------------------------------------------------- module Main where import System.Environment import Text.XML.HXT.Core type Anime = String type AnimeList = [Anime] xpAnime :: PU Anime xpAnime = xpElem "title" $ xpText xpAnimeList :: PU AnimeList xpAnimeList = xpElem "animelist" $ xpList $ xpAnime main :: IO () main = do [src] <- getArgs a <- runX ( xunpickleDocument xpAnimeList [] src) mapM_ putStrLn a return () 8<---------------------------------------------------------------------------- 8<---XML--------------------------------------------------------------------- <animelist> <title>Bleach</title> <title>Naruto</title> </animelist> 8<---------------------------------------------------------------------------- Thanks, -- Alexis Praga, PhD Student (CERFACS) GPG key : AD4A AF6D BB5C 042F 9422 1223 06E1 C1BF E287 65D0