https://issues.apache.org/bugzilla/show_bug.cgi?id=47604

           Summary: [PATCH] Implementation of an XML to XLSX Importer
                    using Custom XML Mapping
           Product: POI
           Version: 3.5-dev
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=24061)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24061)
The diff file

I've implemented a tool to import XML files into XLSX using the Custom XML
Mapping defined in the XLSX.


This closes the loop I've started with the XML exporter
(https://issues.apache.org/bugzilla/show_bug.cgi?id=47520).

I've added some use cases in the test file 
- src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFImportFromXML.java

To give a quick snippet of code on how to use the importer
    // gets one of the Custom XML mapping configured in the workbook
    XSSFMap map = workbook.getMapInfo().getXSSFMapByName("mapping name");
    // creates a new importer for the mapping
    XSSFImportFromXML importer = new XSSFImportFromXML(map);
    // imports the XML
    importer.importFromXML(testXML);



I did also some little modifications to enable an easier access to the map info
data:

  - XSSFMapInfo : added the new method getXSSFMapByName(String mapName)
  - XSSFWorkbook: added a new method to retreive the XSSFMapInfo object
  - XSSFSingleXmlCell: if the related XSSFCell doesn't exists, create a new one
when tring to retreive it
  - XSSFXmlColumnPr : added new getId() and getXPath() methods

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to