-- parse match element (return a singleton list)
parseMatch :: (ArrowXml a) => a XmlTree TMatch
parseMatch =
    (parseMaybeAttr "xpath") &&& (getAttrValue0 "file")
        &&&
        ((getChildren >>> isElem >>>
          ((hasName "apply-template" >>> parseApplyTemplate >>^ MatchApplyTpl)
            <+>
           (hasName "save" >>> parseSave >>^ MatchSave)
            <+>
           (hasName "copy" >>> parseCopy >>^ MatchCopy))) >. id)
    >>^
    (\(x,(y,z)) -> Match {mfile=y, mxpath=x, mitems=z})
parseMatch :: (ArrowXml a) => a XmlTree TMatch
parseMatch =
    (parseMaybeAttr "xpath") &&& (getAttrValue0 "file")
        &&&
        ((getChildren >>> isElem >>>
          ((hasName "apply-template" >>> parseApplyTemplate >>^ MatchApplyTpl)
            <+>
           (hasName "save" >>> parseSave >>^ MatchSave)
            <+>
           (hasName "copy" >>> parseCopy >>^ MatchCopy))) >. id)
    >>^
    (\(x,(y,z)) -> Match {mfile=y, mxpath=x, mitems=z})
parseMatch =
    (parseMaybeAttr "xpath") &&& (getAttrValue0 "file")
        &&&
        ((getChildren >>> isElem >>>
          ((hasName "apply-template" >>> parseApplyTemplate >>^ MatchApplyTpl)
            <+>
           (hasName "save" >>> parseSave >>^ MatchSave)
            <+>
           (hasName "copy" >>> parseCopy >>^ MatchCopy))) >. id)
    >>^
    (\(x,(y,z)) -> Match {mfile=y, mxpath=x, mitems=z})