Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala parser combinators parsing xml?

Tags:

parsing

xml

scala

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.

like image 499
Anonymous Avatar asked Apr 20 '26 10:04

Anonymous


2 Answers

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

like image 195
Daniel C. Sobral Avatar answered Apr 22 '26 23:04

Daniel C. Sobral


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

like image 30
thoredge Avatar answered Apr 22 '26 23:04

thoredge