|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Fwd: Re: Genx - expat co-operation
>From: Tim Bray <tbray@t...> >Subject: Re: Genx - expat co-operation >Date: Sun, 25 Jan 2004 08:52:56 -0800 >To: Toni Uusitalo <toni.uusitalo@p...> >X-Mailer: Apple Mail (2.609) >X-Mail-Handler: MailHop Outbound by DynDNS.org >X-Report-Abuse-To: abuse@d... >X-MHO-User: LaurenAndTim > >On Jan 25, 2004, at 3:17 AM, Toni Uusitalo wrote: > >>I wrote little program demonstrating this, it's called naxWriter > >Damn clever! :) You should send that to xml-dev if you haven't already -Tim Original post: source file isn't attached but can be found here: http://www.saunalahti.fi/~samiuus/toni/xmlproc/naxWriter.c Hi mr Bray, You may have already considered this but this came into my mind yesterday: Expat's isFinal feature (the parameter to XML_Parse etc.) allows us to parse in chunks, you can send it "<node>" and on the next call "text" and then "</node>" etc. This feature makes writing very pedantic (as pedantic as expat) well-formedness writer quite easy. I believe there could even be validity checker attached if one has such a thing on top of expat! I wrote little program demonstrating this, it's called naxWriter which means "natural xml writer" i.e. you can feed "natural" xml to it; it checks well-formedness using expat's XML_Parse and if expat thinks it's ok, it output xml as you wrote it! (You only got yourself to blame for pretty printing flaws ;-) ) Of course one could write StartElement type of constructs with < escaping etc. on top of this. The source is attached, you only have to link it with -lexpat or libexpat.lib in win if you want to test it. I guess there's still need for standalone genx implementation, I don't know if this kind of writer is any good in real world ;-) with respect, Toni Uusitalo
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








