|
From: Bruce M. <ma...@xb...> - 2002-05-07 11:06:13
|
I didn't understand what you want to do. So, no need to communicate the xml over the wire. Sorry. Your original email is as clear as can be. But I somehow read over the wire into it. To do what you want, simply do the following: Instantiate the ParserBean Instantiate the ViewerBean Set the DOMListener property of the ParserBean to the viewer Set the XMLSource property of the ParserBean to the XML file to be parsed. Invoke parser.generateDocument() I have attached some source code that does exactly that. I also included a small xml file and dtd with some data. Bruce P.S. This file was generated by JBuilder. I did not actually write it. But it is certainly fine to write the code that invokes Xbeans. It is not a requirement to use an IDE. Nicolas Silberzahn wrote: > Bonjour, > > Let's try with the simpliest: HTTP. > I don't totally understand the question since to read an XML file and to > print it to the console, i think i don't need any transport mechanism... > Merci beaucoup. > > Nicolas Silberzahn > > Digital Airways > Everywhere <Internet>Technologies</Internet> > www.DigitalAirways.com > > >-----Message d'origine----- > >De : Bruce Martin [mailto:ma...@xb...] > >Envoye : lundi 6 mai 2002 22:32 > >A : Nicolas Silberzahn > >Objet : Re: [xbeans-interest] Need for a jumpstart > > > > > >Nicolas, > > > >If you use an Java Bean design tool you don't write any code. The tool > >generates it for you. "Look Mom, no programming!" > > > >But if you want code, I can certainly send you some code. But the > >code depends > >on which version of the sender receiver you are using. That is > >why I ased you > >if you wanted to use the CORBA, the RMI or the HTTP version. > >Please let me know > >and I'd be happy to send you the code. > > > >Regards, > >Bruce > > > >Nicolas Silberzahn wrote: > > > >> That's precisely a bad idea. People don't need only a tutorial > >to start with > >> a new technology > >> > >> But code that's compile and work the first time they try it > >> There is no code in the tutorial. > >> > >> Just provide a main.java with a listener that reads XML, and > >another xbean > >> that print it on the console. I know how to go further then... > >> I mean code that compile and run. > >> > >> >-----Message d'origine----- > >> >De : Bruce Martin [mailto:ma...@xb...] > >> >Envoye : lundi 6 mai 2002 01:53 > >> >A : Nicolas Silberzahn > >> >Objet : Re: [xbeans-interest] Need for a jumpstart > >> > > >> > > >> >I see. Then I recommend following the tutorial that is on the web site. > >> >If you want to make it even simpler, you can skip the translator xbean. > >> >Just do parser->viewer->sender->receiver->viewer. The sender > >and receiver > >> >mentioned in the tutorial depend on the Java ORB included with modern > >> >JDKs. > >> > > >> >Bruce > >> > > >> >Nicolas Silberzahn wrote: > >> > > >> >> I still use nothing. I found some papers and wanted to build "the most > >> >> simple test" (the one i described) > >> >> I don't know there are many different implementation... > >> >> > >> >> >-----Message d'origine----- > >> >> >De : Bruce Martin [mailto:ma...@xb...] > >> >> >Envoye : samedi 4 mai 2002 17:42 > >> >> >A : Nicolas Silberzahn > >> >> >Objet : Re: [xbeans-interest] Need for a jumpstart > >> >> > > >> >> > > >> >> >Nicolas, > >> >> > > >> >> >Thanks for your interest in Xbeans. What implementation of > >> >> >sender-receiver are > >> >> >you using? The main.java will be impacted by that choice. > >> >> > > >> >> >Bruce > >> >> > > >> >> >Nicolas Silberzahn wrote: > >> >> > > >> >> >> I'm looking for a jumpstart program: a main.java with a listener > >> >> >that reads > >> >> >> XML, and another xbean that print it on the console. > >> >> >> I know how to go further then... > >> >> >> > >> >> >> For product acceptance, such a basic demo should be available > >> >> >for download > >> >> >> at the first page of the web site! > >> >> >> > >> >> >> _______________________________________________________________ > >> >> >> > >> >> >> Have big pipes? SourceForge.net is looking for download mirrors. > >> >> >We supply > >> >> >> the hardware. You get the recognition. Email Us: > >> >> >ban...@so... > >> >> >> _______________________________________________ > >> >> >> xbeans-interest mailing list > >> >> >> xbe...@li... > >> >> >> https://lists.sourceforge.net/lists/listinfo/xbeans-interest > >> >> > > >> >> > > >> > > >> > > > > > |