Without thinking too much about it I expected the string format to be the
most direct.

Looking at the internal storage documentation, it is obvious that Xindice
needs to parse the XML, there are two benefits :
1) Only actual XML documents are stored as such. So less risk of retrieving
inconsistent resources later.
2) XML is saved in a binary form enhancing queries and storage size.

The execution speed impact should be reasonable. The only potential problem
I see is memory consumption. Using DOM for a big document could be quite
significant hit.

Apparently the setContent(String) uses DOM, although noone has verified
this.

Currently I have opted to use SAX.

For the most part I am storing Java Object implemented using XML Binding
(JaxMe), so I never really want the XML document as a string in my finished
solution.

I suggest you use a SAX contenthandler and feed your OutputStream into that.

When u get it to work you can post the code snip for others that run into
these issues :)

Henrik
----- Original Message ----- 
From: "JC Tchitchiama" <[EMAIL PROTECTED]>
To: <xindice-users@xml.apache.org>; "Henrik Vendelbo"
<[EMAIL PROTECTED]>
Sent: Friday, October 31, 2003 12:21 PM
Subject: Re: Storing XML in string format


Henrik,

I'm trying to do somthing close to what you're doing.
XMLResource.setContent(String)  works fine for me. However I'd rather have
XMLResource.setContent(OutputStream) to try avoid parsing the document
many times by me and xindice. Does this sound like what you want too ?

On Wednesday 22 Oct 2003 4:24 pm, Henrik Vendelbo wrote:
> > If this isn't helpful, then I'm probably barking up the wrong tree.
>
> Apparently it was heh. Thanks for the input.
>
> What still remains is a number of questions,
>
> 1) Given a JAXB java object, with the ability to marshal into a DOM tree,
> SAX ContentHandler or java.lang.String;
>  what is the best object to pass to Xindice in order to store it as
regular
> XML ?
>
> 2) Does Xindice have a problem with namespaces ?
>
> 3) Does Xindice handle data internally as DOM trees. I got an error from
> DOM manipulation code, when I attempted to
> use XMLResource.setContent(String) ?
>
> Henrik

-- 

Best Regards.

JC.
           \\- - -//
          (  @ @  )
===oOOo-(_)-oOOo=================================================
      [EMAIL PROTECTED]
=================================================================





Reply via email to