Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
OK.
I have 1. a list of chemical compound IDs (10.000 IDs) 2. a xml output of a database with the records for compounds identified by the ID (almost million records) splitted into .xml files by 25.000. What I want to get certain value buried in the xml tree for an individual compound when the compound`s ID is in my list. During the weekend I was trying to solve a similar problem, when I was parsing other type xml of output, I wanted buried value from records that were containing some value conforming regex. When regex pattern was found the record was parsed by XML:twig (building only the twigs with value of interest and children_text). This strategy (regex and only then xml:pareser), adviced me by Monks pc88mxer and graff, worked great and in fact the IDs I have now are the result. The only difference now is that the records to be xml-parsed should be selected by extracting relevant value for <compoundID>value</compoundID> by regex and then checking if this value is among 10.000 IDs. So I am looking for most efficient way how to look-up the array of IDs (and deleting already found to speed-up the process). Is there some other strategy? Tx for reply. In reply to Re^2: Testing if an array contains a value and then deleting it in most efficient way
by karpatov
|
|