Re: XML support in E

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Jan 15, 2010, at 6:12, Thomas Leonard wrote:
> OK, I can create JSON documents easily enough using
>
> def Term := <type:org.quasiliteral.term.Term>
> def serialised := (testData :Term).asText()
>
> This is nice and fast, and I assume it could produce XML in a  
> similar way.

Huh, I didn't know that worked except for leaf types. (I find that the  
relevant code is in  
org.erights.e.meta.org.quasiliteral.astro.AstroGuardSugar.)

> I can turn the serialised string back into a term like this:
>
> def TermParserMaker := <import:org.quasiliteral.term.makeTermParser>
> TermParserMaker(serialised)
>
> But how do I turn that term back into the E data-structure (i.e.
> reverse the effect of :Term)?

I don't know of a facility to do this. (deJSONKit does so the long way  
around.) MarkM?

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.