Re: Patch for XML pretty printer

Colin Adams <[email protected]> Fri, 4 Sep 2009 16:39:29 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
>> The best way is not to use this pretty printer for serializing XML -
>> really it's only a debug tool. The XSLT serializer should be used for
>> serializing output (note this does not mean you have to run XSLT).
>
> Ok I tried that, but using it seems extremely complicated. You need to
> create a new class and provide implementations for two features and then
> I still haven't figured out how to actually make it output an
> XM_DOCUMENT into a file. This serializer is clearly lacking some
> convenience features. In my opinion outputting a XM_DOCUMENT to disk
> with default settings should not require more than 4 lines of code.
>
> Maybe I'm missing something, but could you provide a simple example how
> to go from XM_DOCUMENT to XML file on disk using the XSLT serializer?

I missed that you were starting from an XM_DOCUMENT.
You would have to produce a stream of events from it, using a node
processor, and use that stream instead of the one produced by the
XM_EIFFEL_PARSER.
And no, I'm not going to try to produce an example.
-- 
Colin Adams
Preston,
Lancashire,
ENGLAND

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july