From: bbense+comp.lang.ruby.May.31.02@... Date: 2002-06-01T01:26:24+09:00 Subject: Re: Ruby, XML schema( RELAX NG) and a Q&D parser -----BEGIN PGP SIGNED MESSAGE----- In article <3cf6932b@news.mhogaming.com>, Sean Russell wrote: >bbense+comp.lang.ruby.May.30.02@telemark.stanford.edu wrote: > >> - - How hard would it be to use ruby to write a tools to take >> the RELAX NG schema description and write out a C parser? >> Ideally, I'd like to go from XML to a C struct. >> >> - - I'd guess REXML and Rock'it would be places to start, any >> other hints. > >REXML won't help you here, because REXML /barely/ deals with internal DTDs, >and doesn't have any native XMLSchema support (yet). What you want sounds >like a lot of work, to me. > >I know I'm the REXML guy, but from what I understand about what you want, >I'd /strongly/ recommend going with XMLParser. Your primary concerns are >speed and streaming, and you don't care about being dependant on a native >library. This is XMLParser in a nutshell. Its streaming parser is quite >fast. > - - I guess I didn't explain very well. I don't want a general purpose XML parser. I want one that only groks the messages of the protocol. I want to use a general Purpose xml parser to write the code for the special purpose XML parser. Sort of like using lex and yacc. - - Something like this http://homepage2.nifty.com/okajima/relaxngcc/index_en.htm Although SAX style is not really what I need. - - It would be alot of work for the complete RELAX NG schema specification, but I don't need all that. The alternative seems to be write a parser by hand, or ditching XML altogether. - - Basically, I need to go from C struct to XML and back. It would be best if all the code to do this were in C. I'd like to use Ruby to write that code from the RELAX NG description of the XML. - - Booker C. Bense -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBPPegBwD83u1ILnWNAQFUVAP/X6iaaUpj8+YnSMhSr5QW5HhedB6x13j/ eiM+Sq6ndYSTpMu/HSDh2DqN/BE0xEUVjrmCEWx3T11D9uwSvj/cHBflaIeiWHdU rTr56HX8iB8TtukVsNdY/KSw61765ohpZlgRNSYhBcqEvBqZ2u6CJkUJkgo2INO7 QxzrNbw1Ct0= =eDHx -----END PGP SIGNATURE----- --