@Override
        public void startElement(String uri, String localName, String qName, Attributes attributes)
                throws SAXException {
            //check each item on spine for pre-paginated
            if ("itemref".equals(localName)) {
                String val = XMLReaderUtils.getAttrValue("properties", attributes);
                if (val != null && val.contains("rendition:layout-pre-paginated")) {
                    metadata.set(Epub.RENDITION_LAYOUT, "pre-paginated");
                }
            } else if ("meta".equals(localName)) {
                String prop = XMLReaderUtils.getAttrValue("property", attributes);
                if ("rendition:layout".equals(prop)) {
                    inRenditionLayout = true;
                }
            } else if ("package".equals(localName)) {
                String v = XMLReaderUtils.getAttrValue("version", attributes);
                if (!StringUtils.isBlank(v)) {
                    metadata.set(Epub.VERSION, v);
                }
            }
        }
Use this to parse the .opf files
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/epub/OPFParser.java