Scala解析器组合器解析XML? [英] Scala parser combinators parsing xml?

查看:84
本文介绍了Scala解析器组合器解析XML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

scala的解析器组合器可以解析xml并验证结束标记与开始标记具有相同的名称吗?我不是直接需要它,但是我想知道我的库的局限性.

Can scala's parser combinators parse xml and validate that the closing tags have the same name as the opening tags? I don't directly need it, but I would like to know the limits of my libraries.

推荐答案

是的,它可以做到.使用into>>(实际上是同一件事)基于解析后的值对后一个解析器进行参数化.

Yes, it can do that. Use into or >> (which is the same thing, really) to parameterize a latter parser based on a parsed value.

这篇关于Scala解析器组合器解析XML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆