> On Dec 14, 2016, at 3:04 PM, Lehi Toskin <[email protected]> wrote: > > I have some XML - rather, XMP data from an image - that I'd like to mess > around with. I've investigated the xml library and found that I can turn the > XML into an XEXPR so I can play around with it like that and even search > through it with se-path*/list, but how would I go from there to replacing > parts of the XEXPR? By my reckoning, I'd need to scan through the list and > locate the data I want and then do something like list-set, but searching > through an XEXPR that can have many nested sublists sounds like a nightmare > to program for.
My `txexpr` library has some higher-level utilities for working with complicated X-expressions. http://docs.racket-lang.org/txexpr/ <http://docs.racket-lang.org/txexpr/> Also see `pollen/decode`, which I designed for selective replacements within text-based X-expressions, but will work with any X-expression: http://docs.racket-lang.org/pollen/Decode.html?q=pollen%2Fdecode <http://docs.racket-lang.org/pollen/Decode.html?q=pollen/decode> > I suppose I could take a look at the XML string and do a regexp-match or > something similar, but that seems inelegant and almost brute-force-y. That way madness lies. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

