You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Ciprian Popovici <ci...@sap.ro> on 2002/06/27 09:35:50 UTC

Truncating request results?

Hello everybody,

If you request a certain XML element with an XPath expression you also
get everything under the matching elements (i.e. all their children
and their children's children and so on and so forth).

But this may sometimes cause unnecesary transfer of large amounts of
data that I don't actually need. I only need the parent element. Yeah,
it wouldn't return "politically correct" XML, but I may not care.

So my questions are:

1. How would I go about implementing such a trick in Xindice? I'm
guessing it involves hacking the sources and adding a parameter
somewhere (do or do not return the children too).

2. Is it worth it? Would such a hack improve performance any, or the
same amount of data would be retrieved anyway and the only difference
would be in the quantity passed to the client, or something like this?

3. Is this the right place to be asking this? :) If not, should I
talk to the developers perhaps?

--Ciprian Popovici


Re: Truncating request results?

Posted by Erhan Baz <er...@yahoo.com>.
Hi, 

There is an example about XMLObject in developers
guide. And this example would reply your questions. 

These XMLObjects are run in server side and you can
remove unwanted nodes by DOM methods. And return the
new node back to the client. But I think the problem
is running XMLObject example. I haven't run it yet. 

Good lock:) 


--- Ciprian Popovici <ci...@sap.ro> wrote:
> Hello everybody,
> 
> If you request a certain XML element with an XPath
> expression you also
> get everything under the matching elements (i.e. all
> their children
> and their children's children and so on and so
> forth).
> 
> But this may sometimes cause unnecesary transfer of
> large amounts of
> data that I don't actually need. I only need the
> parent element. Yeah,
> it wouldn't return "politically correct" XML, but I
> may not care.
> 
> So my questions are:
> 
> 1. How would I go about implementing such a trick in
> Xindice? I'm
> guessing it involves hacking the sources and adding
> a parameter
> somewhere (do or do not return the children too).
> 
> 2. Is it worth it? Would such a hack improve
> performance any, or the
> same amount of data would be retrieved anyway and
> the only difference
> would be in the quantity passed to the client, or
> something like this?
> 
> 3. Is this the right place to be asking this? :) If
> not, should I
> talk to the developers perhaps?
> 
> --Ciprian Popovici
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com