a library to index XML files for random access.
XXIndex library is originally a part of the PSI-Dev project. It aims at addressing the needs for quick data retrieval in large XML files. The key features of the library include:
The XXIndex library is currently used by many projects, below are a couple of them:
This library is written in Java, brought to you by the PRIDE team.
The zip file in the downloads section contains the XXIndex jar file and all other required libraries.
The XXIndex library can be used in Maven projects, just include the following snippets in the appropriate sections of your Maven pom file.
<dependency> <groupId>psidev.psi.tools</groupId> <artifactId>xxindex</artifactId> <version>0.10</version> </dependency>
<repository> <id>ebi-repo</id> <name>The EBI internal repository</name> <url>http://www.ebi.ac.uk/~maven/m2repo</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository>
Note: you may want to update the version number to the latest version available in the repository.
For developers, the latest source code is available from our SVN repository.
The first step of using the XXIndex library is to index the XML file. For instance, if you want to read a file named: example.xml, you should first initialize an instance of StandardXpathAccess, the code below will show you how to do that:
// create index for xml file StandardXpathAccess access = new StandardXpathAccess("example.xml");
Once the index has been created, you can access the elements using their Xpath. For example, the code below shows you how to get the number elements in the file:
// Get the index of the file XpathIndex index = access.getIndex(); // Get the number of a element int count = index.getElementCount("xpath/to/element/");
To come in the future
To come in the future
If you have questions or need additional help, please contact the PRIDE Helpdesk at the EBI: pride-support at ebi.ac.uk (replace at with @).
Please send us your feedback, including error reports, improvement suggestions, new feature requests and any other things you might want to suggest to the PRIDE team.
The source code for this project can be found in the PSI-dev SourceForge SVN repository: http://psidev.svn.sourceforge.net/svnroot/psidev/psi/tools/xxindex/trunk