3

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.

1
  • I'm not shure but i believe the scala.xml Library checks also the closing tags. Commented Mar 11, 2011 at 9:50

3 Answers 3

4

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

Sign up to request clarification or add additional context in comments.

Comments

3

This document seem to describe an attempt on that: http://www.berniepope.id.au/docs/scala_parser_combinators.pdf

... and a link to the software (Scala XML-parser): http://www.berniepope.id.au/software.html

3 Comments

Part of the idea was that the parser would validate the end tags, which it doesn't.
Dead links for the software as of this writing.
Are you sure? Works now
0

You might also be interested in XML pickler combinators, part of the GData Scala client library. I've pulled out the pickler combinators and made them available in a self-contained library here.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.