[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ozone + xerces.DOMWriter



Hi Micky,

Fri, 17 Mar 2000 Micky Doyle wrote:
>>Hi,
>I'm new to both XML and ozone and am having trouble following this thread.
>What is DOMWriter? I'm using 0.3.2 and xerces 1_0_3 and found it in neither.

DOMWriter is a sample application to be found in the Xerces source package.
(samples/dom/DOMWriter.java) This sample prints out a parsed document. But it
is not a general solution like the Serializer package already is.

>I have attached some code I've written which works but is a little slow, to
>print the document I'm using Xerces serialize package and it works. I would
>like to take your advice and do something like this on the server.
>How do I go about doing this?

If you look at the ozone source tree you will find an interface named
org.ozoneDB.xml.util.Writer which you can use do produce a server side
xml printer. You just have to implement the write() method call your
native methods. Use XalanXMLWriter.java as an example.

> Is the XML support a pre made regular Ozone
>object? Is there an object interface/implementation I can extend?

Maybe you can upgrade ypur ozone to the latest stable version? There were
many things changed since 0.3.2!

>What I would ultimately like to do is this:
>Manage a XML document in the server, offer methods to manipulate it and
>return subsets of it from the server thus avoiding having to iterate the
>entire document at the client.

>One last question: Why do I need to pass dI.getDocumentElement() to the
>serialize method and not just dI?

I don't know the Serializer package very well but a first look at the source
said that there is a method 'public void serialize (Document doc)' to print a
document...

Regards,
Lars
--
________________________________________________________________
Lars Martin                         mailto:lars@softwarebuero.de
softwarebuero m&b (SMB)              http://www.softwarebuero.de