You can use a dummy javax.xml.transform.Transformer

A psudo code snip:

Transformer transformer =
TransfomerFactory.newInstance().newTransformer();

transformer.transform(new DOMSource(yourDOM), New
StreamResult(yourStream));

You need Xalan for this.

-- Li Liang



-----Original Message-----
From: Swanson, Brion [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 11:02 AM
To: '[EMAIL PROTECTED]'
Subject: RE: JAXP and serialization APIs


I'm sorry, I was unclear with my use of 'serialize'.  I meant
serializing
the DOM into XML (as in the org.apache.xml.serialize package).  I'd like
to
have a standard interface for serializing a DOM to XML without having to
commit to one particular implementation (such as Xerces implementation).

I'm interested in this because of a recent effort to make my code a bit
more
"portable" - that is, using standard APIs rather than some third-party's
specific implementation of XML processing and serializing.

Hope this clears things up for you.

--------------
Brion Swanson - West Group / Rochester, NY
mailto:[EMAIL PROTECTED]


-----Original Message-----
From: Reynolds, Ron [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 10:34 AM
To: '[EMAIL PROTECTED]'
Subject: RE: JAXP and serialization APIs


do the serialization by hand?  serialization requires binary
compatibility
between objects (with relatively simliar VMs).  of course you could
always
convert the DOM to XML and serialize that, which is probably easier than
doing it by hand and has roughly the same result.  either way i don't
think
you can avoid constructing a new DOM tree on the receiving side and
expect
it to self-populate from the incoming serialized DOM tree (unless they
have
matching internal implementations).

-----Original Message-----
From: Swanson, Brion [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 7:17 AM
To: '[EMAIL PROTECTED]'
Subject: JAXP and serialization APIs


I know that JAXP is a common API for parsing XML (that is, you can plug
any
compliant XML parser in without changing any code), but is there
anything
like that for serializing a Document?

I must be missing something because I'm not finding any serializers that
aren't tied to any given package.

For example, I'm using Xerces to do my parsing through its
implementation of
the JAXP API.  I'd also like to serialize a Document or two, but it
appears
that I now must tie my application into some particular implementation -
that is to say, Xerces.

Is there anyway I can get around this?

--------------
Brion Swanson - West Group / Rochester, NY
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to