-- parse config from XML String
parseConfigXML :: String -> TConfig
parseConfigXML cfgStr =
    let cfg = runLA (xreadDoc >>> parseConfig) cfgStr
    in
        case cfg of
            [h] -> h
            []  -> error "Config error (no root)"
            _   -> error "Config error (multiple roots)"
parseConfigXML :: String -> TConfig
parseConfigXML cfgStr =
    let cfg = runLA (xreadDoc >>> parseConfig) cfgStr
    in
        case cfg of
            [h] -> h
            []  -> error "Config error (no root)"
            _   -> error "Config error (multiple roots)"
parseConfigXML cfgStr =
    let cfg = runLA (xreadDoc >>> parseConfig) cfgStr
    in
        case cfg of
            [h] -> h
            []  -> error "Config error (no root)"
            _   -> error "Config error (multiple roots)"