Hi Cezar,

the original document is the below:

<?xml version="1.0" encoding="UTF-8"?>
<eda:quoteEvent xmlns:eda="http://www.bsource.ch/EDA";>
        <eda:security>CS GROUP N</eda:security>
        <eda:date>09-03-2007</eda:date>
        <eda:time/>
        <eda:national-nr>1213853</eda:national-nr>
        <eda:change>-0.2</eda:change>
        <eda:volume>5821192</eda:volume>
        <eda:currency transcoder="CURRENCY">CHF</eda:currency>             // 
this line will be changed
        <eda:prev-close>87.9</eda:prev-close>
        <eda:open>87.75</eda:open>
        <eda:last>87.7</eda:last>
</eda:quoteEvent>

size 471 bytes

The xpath expression:

                long start = System.currentTimeMillis();
                XmlObject[] elems = bodyEvent.selectPath("//@transcoder/..");
                System.out.println ("execQuery elapsed time msec: " + 
(System.currentTimeMillis() - start));

the output is:

execQuery elapsed time msec: 3547
Response:
<eda:quoteEvent xmlns:eda="http://www.bsource.ch/EDA";>
  <eda:security>CS GROUP N</eda:security>
  <eda:date>09-03-2007</eda:date>
  <eda:time/>
  <eda:national-nr>1213853</eda:national-nr>
  <eda:change>-0.2</eda:change>
  <eda:volume>5821192</eda:volume>
  <eda:currency transcoder="CURRENCY">001</eda:currency>    // the changed line
  <eda:prev-close>87.9</eda:prev-close>
  <eda:open>87.75</eda:open>
  <eda:last>87.7</eda:last>
</eda:quoteEvent>

executed from eclipse 3.2.0 on my PC (Pentium 4 3.2 Ghz, 1 GB RAM).

Patrizio


-----Original Message-----
From: Cezar Andrei [mailto:[EMAIL PROTECTED] 
Sent: martedì, 10. aprile 2007 23:49
To: [email protected]
Subject: RE: XMLBeans and XmlCursor


Hi Patrizio,

Depending on how complex you xpath will be executed by an internal
XMLBeans engine or Saxon engine. The XMLBeans xpath engine is usually
much faster but supports a very limited subset of xpath. Saxon on the
other hand is more complete but since it uses XMLBeans store as a DOM it
usually is slower. But even for Saxon 3s for a 400k doc is kind of much
on today's procs, but again how complex is the xpath?

Cezar

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 10, 2007 2:54 AM
> To: [email protected]
> Subject: RE: XMLBeans and XmlCursor
> 
> Hi Cezar,
> 
> thanks. I've used:
> 
> - XMLCursor.selectPath()
> - only one XMLCursor object
> - + cursor.push() & cursor.pop() methods.
> 
> Now the result is ok:
> 
> Response:
> <eda:quoteEvent xmlns:eda="http://www.bsource.ch/EDA";>
>   <eda:security>CS GROUP N</eda:security>
>   <eda:date>09-03-2007</eda:date>
>   <eda:time/>
>   <eda:national-nr>1213853</eda:national-nr>
>   <eda:change>-0.2</eda:change>
>   <eda:volume>5821192</eda:volume>
>   <eda:currency transcoder="CURRENCY">001</eda:currency>
>   <eda:prev-close>87.9</eda:prev-close>
>   <eda:open>87.75</eda:open>
>   <eda:currency transcoder="CURRENCY">002</eda:currency>
>   <eda:last>87.7</eda:last>
> </eda:quoteEvent>
> 
> but what about the 'huge response time' ?
> 
> execQuery elapsed time msec: 3281 for a document of only 471 bytes !
> 
> Thanks again
> Patrizio
> 
> 

Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

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


IMPORTANT:
This e-mail transmission is intended for the named
addressee(s)only.
Its contents are private, confidential and protected
from disclosure and should not be read, copied or
disclosed by any other person.
If you are not the intended recipient, we kindly ask
you to notify the sender immediately by telephone
(+41 (0)58 806 50 00), to redirect the message to the
account "[EMAIL PROTECTED]" and to delete this e-mail.
E-mail transmissions may be intercepted, altered or
read by unauthorized persons and may contain viruses.
Therefore, it is recommended that you use regular mail
or courier services for any information intended to be
confidential. However, by sending us messages through
e-mail, you authorize and instruct us to correspond by
e-mail in the relevant matter.
Thank you.


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

Reply via email to