I'm looking for a simple way to represent a search query as XML.

The query language applies to email messages, and is a superset of the
IMAP SEARCH syntax. It can express things like "flag blah is set, and
the subject contains foo, and the text contains bar or baz": a handful
of primitives plus the usual logical combinators.

I want to take that query (stored internally as an sexpr-style string)
and render it as XML. I don't really care what the output looks like, I
only need to be able to manipulate its structure with some JavaScript,
and then send it back to the server.

Of course, I could just sprinkle some < and > around and come up with
something; but I'm wondering if there's something around that is meant
to be used for such purposes already. It's hard to ask Google for such
a thing (because of e.g. XQuery and XPath) and so far I have failed to
explain what I want to people who know more about XML than I do.

Why XML? Because it has to be something. I don't care, I just want to
be able to simply edit it with JavaScript.

Any thoughts? (Tim?)

-- ams

Reply via email to