Re: [Jsdsi-devel] JSDSI xml
Status: Pre-Alpha
                
                Brought to you by:
                
                    sajma
                    
                
            | 
      
      
      From: Sean R. <sra...@ae...> - 2004-02-25 17:40:01
      
     | 
| Look good to me Sameer. Nice stuff. (at first I wondering if the placing of the 'local name' of CarolJones was correct, but I think it is the right thing to do - not many xml documents have a tag and a text value as direct children of another tag). Sean On Wed, 2004-02-25 at 02:54, Sameer Ajmani wrote: > I have just committed a simple Sexp-to-XML converter to JSDSI. This makes > it possible to express JSDSI objects as XML (by first converting them to > S-expressions). I added the package jsdsi.xml and the class > jsdsi.xml.XmlWriter, and extended the jsdsi.S2X utility to support xml > output. Here's an example: > > Input S-expression: > > (cert > (issuer > (name > (public-key > (rsa-pkcs1-md5 > (e #010001#) > (n > |AKd6zpHoNSq53rFFZ6XZV5m+YZKr1Ym9fUMuE8yHMOZx9AsrWqkZyMxZ9Cn > 5mIPaTLqYEakoJ7lir25a/Nq1IpvFC8mlalpI2LINDRnIt3HbmiFEj97Eaqk > 2ffhwXotFHIbPGyrgrMobOtWIpG56Ru5AK230lG68+ZyntCqB53v5|))) > CarolJones)) > (subject > (public-key > (rsa-pkcs1-md5 > (e #010001#) > (n > |AK0aiccf7Yj/Gzx93m6R6suJiPr5o9ZON6dG31wwDyGK2aKoMJUYLxVMWGh5R > 2Wsc+RO+ylvablNhmO7zGiZ9qNiN+vdTjdxMALx4ULFF1aYNi86QsSgU/x8Xrk > 2SiHQ9EkHGDJ7Bpng+4LNSjQtm2DuEscHP3mqz8BzGB+jTek/|))))) > > Output XML: > > <cert> > <issuer> > <name> > <public-key> > <rsa-pkcs1-md5> > <e> > #010001# > </e> > <n> > |AKd6zpHoNSq53rFFZ6XZV5m+YZKr1Ym9fUMuE8yHMOZx9AsrWqkZyMxZ9Cn5 > mIPaTLqYEakoJ7lir25a/Nq1IpvFC8mlalpI2LINDRnIt3HbmiFEj97Eaqk2 > ffhwXotFHIbPGyrgrMobOtWIpG56Ru5AK230lG68+ZyntCqB53v5| > </n> > </rsa-pkcs1-md5> > </public-key> > CarolJones > </name> > </issuer> > <subject> > <public-key> > <rsa-pkcs1-md5> > <e> > #010001# > </e> > <n> > |AK0aiccf7Yj/Gzx93m6R6suJiPr5o9ZON6dG31wwDyGK2aKoMJUYLxVMWGh5R2 > Wsc+RO+ylvablNhmO7zGiZ9qNiN+vdTjdxMALx4ULFF1aYNi86QsSgU/x8Xrk2 > SiHQ9EkHGDJ7Bpng+4LNSjQtm2DuEscHP3mqz8BzGB+jTek/| > </n> > </rsa-pkcs1-md5> > </public-key> > </subject> > </cert> > > The problems with this are that it's not terribly compact (e.g., the "e" > elements could be all on one line), I'm not sure whether all the > characters used in the text blocks are allowed, there's no schema or DTD, > and there's no XmlReader (yet). But does this conversion look reasonable? > > Sameer > > http://ajmani.net > > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Jsdsi-devel mailing list > Jsd...@li... > https://lists.sourceforge.net/lists/listinfo/jsdsi-devel -- Dr. Sean Radford, MBBS, MSc sra...@ae... http://www.aegeus-technology.com |