RE: Parsed XML an ZCatalog

[email protected] Mon, 20 Oct 2003 09:59:07 -0700
Newsgroups gmane.comp.web.zope.parsed-xml
Message-ID <AA7A72A46469D411B8B300508BE329500AE4DE73@desi2>
You need to write schema-specific methods to get access to your data.  If
you want to index something like this: <headline>Foo</headline> you need to
create a getHeadline method that can be called on the ParsedXML object.

Write DOM traversal "accessor" methods (python scripts) in the root folder
of your application (or CMF skins folder) for each field you care about
extracting in the documents.  Then add indexes to the catalog associated
with those method names.  You will then be able to index the results of
document searches on a per-field basis.  This only works in the case where
you want your search result to point to the whole document, but you want to
be able to specify fields on the document.

> -----Original Message-----
> From: Jaared Scott [mailto:[email protected]]
> Sent: Thursday, October 16, 2003 1:05 PM
> To: [email protected]
> Subject: [Parsed-XML-Dev] Parsed XML an ZCatalog
> 
> 
> I'm trying to perform searches on a parsed XML file.  No luck yet. 
> Users come to my portal.... fill out a form and submit the form.  My
> form posts to a python script which creates an xml file (basically a
> user profile).  I would like to be able to search these xml
> "user-profile" files.  I created a Catalog and did the "find-objects"
> thing by selecting "parsed XML."  I'm not sure how to utilize the
> indexes and meta-type features.  I have tried both.  The catalog finds
> the xml objects..... but I can't seem to query elements within the xml
> file.  Heck, it might be better to do this in python...... I thought I
> would try the catalog feature... so far I am getting nowhere... Any
> gurus out there?
> 
> Tux rules!
> 
> ===============================================
> 
> Jaared Scott
> Systems Analyst
> Oklahoma Department of Career and Technology Education
> 405 743 5176
> [email protected]
> 
> _______________________________________________
> Parsed-XML-Dev mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/parsed-xml-dev
>