[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Fwd: Re: Genx - expat co-operation


expat isfinal

>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 &lt; 
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.