xml :: Element -> Maybe ImageInfoResponse
xml e = do
  guard (elName e == nsName "api")
  let es1 = children e
  p  <- pNode "query" es1 >>= (pNode "pages").children
  let es = children p
  ps <- fmap (mapMaybe xmlPage) (fmap children $ pNode "page" es)
  let cont = pNode "query-continue" es1 >>= xmlContinue "imageinfo" "iistart"
  return emptyImageInfoResponse{iiPages=ps,iiContinue=cont}
xml :: Element -> Maybe ImageInfoResponse
xml e = do
  guard (elName e == nsName "api")
  let es1 = children e
  p  <- pNode "query" es1 >>= (pNode "pages").children
  let es = children p
  ps <- fmap (mapMaybe xmlPage) (fmap children $ pNode "page" es)
  let cont = pNode "query-continue" es1 >>= xmlContinue "imageinfo" "iistart"
  return emptyImageInfoResponse{iiPages=ps,iiContinue=cont}
xml e = do
  guard (elName e == nsName "api")
  let es1 = children e
  p  <- pNode "query" es1 >>= (pNode "pages").children
  let es = children p
  ps <- fmap (mapMaybe xmlPage) (fmap children $ pNode "page" es)
  let cont = pNode "query-continue" es1 >>= xmlContinue "imageinfo" "iistart"
  return emptyImageInfoResponse{iiPages=ps,iiContinue=cont}