xmlPage :: Element -> Maybe (PageTitle,[ImageInfo])
xmlPage e = do
   guard (elName e == nsName "page")
   let es = children e
   p <- pNode "imageinfo" es
   let es1 = children p
   cs <- fmap (mapMaybe (xmlII "ii")) (fmap children $ pNode "ii" es1)
   let ns     = fromMaybe "0" $ pAttr "ns" p
   let tit    = fromMaybe ""  $ pAttr "title" p
   let mbpid  = pAttr "pageid" p
   let miss   = isJust (pAttr "missing" p)
   let rep    = pAttr "imagerepository" p
   return (emptyPageTitle{pgNS=ns,pgTitle=tit,pgMbId=mbpid}, cs)
xmlPage :: Element -> Maybe (PageTitle,[ImageInfo])
xmlPage e = do
   guard (elName e == nsName "page")
   let es = children e
   p <- pNode "imageinfo" es
   let es1 = children p
   cs <- fmap (mapMaybe (xmlII "ii")) (fmap children $ pNode "ii" es1)
   let ns     = fromMaybe "0" $ pAttr "ns" p
   let tit    = fromMaybe ""  $ pAttr "title" p
   let mbpid  = pAttr "pageid" p
   let miss   = isJust (pAttr "missing" p)
   let rep    = pAttr "imagerepository" p
   return (emptyPageTitle{pgNS=ns,pgTitle=tit,pgMbId=mbpid}, cs)
xmlPage e = do
   guard (elName e == nsName "page")
   let es = children e
   p <- pNode "imageinfo" es
   let es1 = children p
   cs <- fmap (mapMaybe (xmlII "ii")) (fmap children $ pNode "ii" es1)
   let ns     = fromMaybe "0" $ pAttr "ns" p
   let tit    = fromMaybe ""  $ pAttr "title" p
   let mbpid  = pAttr "pageid" p
   let miss   = isJust (pAttr "missing" p)
   let rep    = pAttr "imagerepository" p
   return (emptyPageTitle{pgNS=ns,pgTitle=tit,pgMbId=mbpid}, cs)