Hi Oliver,

Please make sure you reply to the list, instead of to me privately.

I _am_ recommending you use Xalan's "DOM" implementation.  The way you do
that is through SAX events and a XalanDocumentBuilder instance.  Xalan's
DOM cannot be built through standard DOM APIs.

You can use the Xerces DOM, but it has to be wrapped in a translation
layer, and that's expensive.

Hope that helps...

Dave



                                                                                
                                                         
                      [EMAIL PROTECTED]                                         
                                                          
                      ensys.com                To:      [EMAIL PROTECTED]       
                                                
                                               cc:                              
                                                         
                      01/09/2003 02:19         Subject: Re: Simple example of 
transforming an in memory DOM                              
                      PM                                                        
                                                         
                                                                                
                                                         




Hmmm,

so you wouldn't recommend using Xalan's DOM implementation to create a
document?

I'll have a look at DocumentBuilder, thanks.

--
Oli White




                    David N

                    Bertoni/Cambridge/        To:
[email protected]
                    IBM                       cc:

                    <[EMAIL PROTECTED]        Fax to:

                    s.ibm.com>                Subject:     Re: Simple
example of transforming an in memory DOM

                    01/10/03 03:50 AM











Hi Oliver,

I'm not sure I understand exactly what you're looking for.  If you just
want to transform an XML document in a file using a stylesheet it a file,
take a look at the either the SimpleTransform sample or the XalanTransform
sample.

If you're trying to create the input tree programmatically, the best way to
do that is through SAX events.  For that, take a look at the
DocumentBuilder sample.

Dave




                      [EMAIL PROTECTED]

                      ensys.com                To:
[email protected]

                                               cc:      (bcc: David N
Bertoni/Cambridge/IBM)
                      01/08/2003 05:58         Subject: Simple example of
transforming an in memory DOM
                      PM





Hi folks,

I don't know if this is too much to ask, but I'm having a little trouble
deciphering the API documentation.

I just need a simple example such as the following:

Create a simple DOM from scratch like so:

<x>
     <y></y>
</x>

Pass the DOM as a XSLTInputSource to XalanTransformer::transform() with a
filename parameter

That simple.

A function implementation such as

void transform(char* filename) { ... }

would be perfect.

TIA,

Oliver White
Software Engineer
Westinghouse Signals Australia









Reply via email to