Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xml-dev] Text based search or Xpath search

From: "Michael Kay" <mike@--------.--->
To: "'Ram Sundar'" <ram0812@-------.--->,<bob@------.--->
Date: 1/9/2006 8:53:00 AM
If the XML is a file on disk, then it's going to have to be 
read from disk and parsed into a tree structure before XPath can operate on it. 
This is likely to take longer than the actual XPath evaluation. However, if you 
are doing repeated XPath searches, then the parsing only needs to be done once 
(you can hold the tree in memory).
 
Michael Kay
http://www.saxonica.com/


  
  
  From: Ram Sundar [mailto:ram0812@h...] 
  
Sent: 09 January 2006 08:28
To: 
  bob@o...
Cc: xml-dev@l...
Subject: Re: 
  [xml-dev] Text based search or Xpath search


  
  
  
  Yes, i guess you have a point. The whole purpose of storing the meta data 
  in the text file was for optimising the speed. But unfortunately handling of 
  large amount of data is slow. 
  I thought that by using the XML XPATH, I need not go through all the other 
  data (by not doing a file.readline) if I wanted to search for documents 
  with a certain name thus saving some time. But perhaps XPATH has to go 
  through the whole document anyway.
  Or am I cycling out in the forrest?

  Ram

  
  
    

    From:  Bob Foster 
    <bob@o...>
To:  Ram Sundar 
    <ram0812@h...>
CC:  xml-dev@l...
Subject:  Re: 
    [xml-dev] Text based search or Xpath search
Date:  Sun, 
    08 Jan 2006 17:51:22 -0800
>A raw text file search should be way 
    faster, but it really depends 
>on how you're doing the 
    search.
>
>Bob
>
>Ram Sundar wrote:
> > 
    Hi,
> >
> >     I have a text file 
    that contains all the meta data of 
>documents and
> > 
    folders like name, created date, modified date, owner etc. I 
    
>generate
> > this text file everytime a user wants to 
    search for the meta data
> > through python. I have a web interface 
    where the user can input 
>the
> > necessary parameters 
    he/she wants to search for. But, this 
>operation of
> > 
    reading the information from the text file is slow. It becomes 
    
>extremely
> > slow, if there is quite a lot of information 
    to go through, 
>naturally.
> >
> > Now, I was 
    thinking that I can store the meta data as an XML file
> > instead 
    and use the XPATH option available in python to retrieve 
>the
> 
    > necessary information.
> >
> > Do you guys think that 
    storing the data in an XML file and using 
>the
> > XPATH 
    search will be faster than the text file search?
> >
> > 
    Thanks for you input in advance,
> >
> > 
    Ram
>
>
>-----------------------------------------------------------------
>The 
    xml-dev list is sponsored by XML.org <http://www.xml.org>, 
    an
>initiative of OASIS 
    <http://www.oasis-open.org>
>
>The list archives are at 
    http://lists.xml.org/archives/xml-dev/
>
>To subscribe or 
    unsubscribe from this list use the subscription
>manager: 
    <http://www.oasis-open.org/mlmanage/index.php>
>
----------------------------------------------------------------- 
  The xml-dev list is sponsored by XML.org <HTTP: www.xml.org>, an initiative of 
  OASIS <HTTP: www.oasis-open.org>The list archives are at 
  http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this 
  list use the subscription manager: <HTTP: www.oasis-open.org index.php 
  mlmanage>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent