Re: XML support in E

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Jan 16, 2010, at 20:07, Mark Miller wrote:
> On Fri, Jan 15, 2010 at 4:47 AM, Kevin Reid <[email protected]> wrote:
>> On Jan 15, 2010, at 6:12, Thomas Leonard wrote:
>>> 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?
>>
>> For leaf data terms, their __conformTo already knows how to auto- 
>> coerce to their primitive data value.
>
> Kevin, regarding non-leaf terms, I recall you once wrote such a  
> guard as an experiment, but I don't think we ever added it to the E  
> library. As I recall, at the time you may have called it Termish.  
> But that conflicts with a different use of that name in the  
> org.quasiliteral.term package. I may be misremembering.

That does seem like something I might have written, but I don't recall  
where I might have done so. I did write a guard called Termish, but it  
was just an incidental example of using trinary-define; what it did  
was match recursive trees of ["tagname", subterms...].
http://www.eros-os.org/pipermail/e-lang/2005-August/010942.html


-- 
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.