[
https://issues.apache.org/jira/browse/ODFTOOLKIT-376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guzman Rejon closed ODFTOOLKIT-376.
-----------------------------------
Resolution: Not A Problem
> Get Metadata from Open Office Files
> -----------------------------------
>
> Key: ODFTOOLKIT-376
> URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-376
> Project: ODF Toolkit
> Issue Type: Improvement
> Components: odfdom
> Affects Versions: 0.5-incubating, 0.6-incubating
> Environment: Windows 7, java 1.7
> Reporter: Guzman Rejon
> Labels: features, performance, test
> Fix For: 0.5-incubating
>
>
> I need to modify only the Open Office file metadata. How I can do it without
> loading the entire file into memory (file.odt)?
> I need to work only with the file: meta.xml and label: <office:meta> ...
> metadata ... </ office: meta>
> My code loads the meta.xml file but I can not get metadata:
> OdfPackage pkg = OdfPackage.loadPackage(new File("file.odt"));
> Node d =
> pkg.getDom("meta.xml").getElementsByTagName("office:document-meta").item(0);
>
> for(int i =0; i<d.getAttributes().getLength();i++) {
> String nombre = d.getAttributes().item(i).getNodeName();
> String valor = d.getAttributes().item(i).getNodeValue();
> System.out.println("Clave: " + nombre + " valor: " + valor);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira