[Ur] Parsing xml fragments.

Adam Chlipala adamc at csail.mit.edu
Thu Oct 11 19:09:13 EDT 2012


On 10/10/2012 01:22 PM, Alexei Golovko wrote:
> What is the best way to parse xml on the client side? More precisely, 
> I need to process not only full xml data, but also the fragments like 
> /"bla-bla</em> baz-baz-<strong>baz</strong>"/ with bounds in the text 
> nodes (that is not inside tag as /"end-of-tag-name> text"/).
> I have some (quick and dirty) parsec-like combinators, but they are 
> buggy and too slow.

So you want fragments that are not legal XML on their own?  Well, which 
type do you want to target with your translation?

Two bits of related library code:
- A basic & configurable HTML parser (only does legal fragments, 
though): http://hg.impredicative.com/meta/file/7530b2b54353/html.urs
- The XML feed processing library: http://hg.impredicative.com/feed

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20121011/b3319b6f/attachment.html>


More information about the Ur mailing list